This commit is contained in:
vis2k 2021-05-11 11:52:13 +08:00
parent 545fc995c4
commit ba24121013

View File

@ -205,8 +205,9 @@ public static void ConnectLocalServer()
// disconnect //////////////////////////////////////////////////////////
/// <summary>Disconnect from server.</summary>
// Simply call NetworkConnection.Disconnect -> Transport.Disconnect.
// Cleanup happens in OnTransportDisconnected!
// IMPORTANT: calling Disconnect() asks Transport to Disconnect and then
// Disconnects later in OnTransportDisconnected.
// => it does NOT fully disconnect IMMEDIATELY!
public static void Disconnect()
{
connection?.Disconnect();