Fix NRE with ConnectionStateChanged

This commit is contained in:
teinarss
2021-06-17 18:45:07 +02:00
committed by abcdefg30
parent 3e6e5a83f3
commit 5e1468facb
5 changed files with 15 additions and 16 deletions

View File

@@ -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)
{

View File

@@ -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");