Fix NRE with ConnectionStateChanged
This commit is contained in:
@@ -31,7 +31,6 @@ namespace OpenRA.Network
|
||||
public interface IConnection : IDisposable
|
||||
{
|
||||
int LocalClientId { get; }
|
||||
ConnectionState ConnectionState { get; }
|
||||
void Send(int frame, List<byte[]> orders);
|
||||
void SendImmediate(IEnumerable<byte[]> orders);
|
||||
void SendSync(int frame, byte[] syncData);
|
||||
@@ -51,8 +50,6 @@ namespace OpenRA.Network
|
||||
|
||||
public virtual int LocalClientId => 1;
|
||||
|
||||
public virtual ConnectionState ConnectionState => ConnectionState.PreConnecting;
|
||||
|
||||
public virtual void Send(int frame, List<byte[]> orders)
|
||||
{
|
||||
var ms = new MemoryStream();
|
||||
@@ -256,7 +253,7 @@ namespace OpenRA.Network
|
||||
}
|
||||
|
||||
public override int LocalClientId => clientId;
|
||||
public override ConnectionState ConnectionState => connectionState;
|
||||
public ConnectionState ConnectionState => connectionState;
|
||||
|
||||
public override void SendSync(int frame, byte[] syncData)
|
||||
{
|
||||
|
||||
@@ -34,7 +34,6 @@ namespace OpenRA.Network
|
||||
Dictionary<int, int> lastClientsFrame = new Dictionary<int, int>();
|
||||
|
||||
public int LocalClientId => -1;
|
||||
public ConnectionState ConnectionState => ConnectionState.Connected;
|
||||
|
||||
public IPEndPoint EndPoint => throw new NotSupportedException("A replay connection doesn't have an endpoint");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user