NetworkClient.Shutdown calls Client.Disconnect as suggested in #923

This commit is contained in:
vis2k 2020-01-10 12:34:42 +01:00
parent 260cb49698
commit 49d93d814c

View File

@ -460,6 +460,11 @@ public static void Shutdown()
ClientScene.Shutdown();
connectState = ConnectState.None;
handlers.Clear();
// disconnect the client connection.
// we do NOT call Transport.Shutdown, because someone only called
// NetworkClient.Shutdown. we can't assume that the server is
// supposed to be shut down too!
Transport.activeTransport.ClientDisconnect();
}
/// <summary>