NetworkConnectionToServer disco cleanup

This commit is contained in:
vis2k 2021-05-11 11:25:39 +08:00
parent 120333c8e6
commit 4de0d4a28a

View File

@ -18,13 +18,10 @@ internal override void Send(ArraySegment<byte> segment, int channelId = Channels
}
/// <summary>Disconnects this connection.</summary>
// IMPORTANT: calls Transport.Disconnect.
// Transport.OnDisconnected is then called at some point in the future.
public override void Disconnect()
{
// set not ready and handle clientscene disconnect in any case
// (might be client or host mode here)
// TODO remove redundant state. have one source of truth for .ready!
isReady = false;
NetworkClient.ready = false;
Transport.activeTransport.ClientDisconnect();
}
}