mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
fix: #3787 NetworkManager.StopClient() doesn't immediately call OnClientDisconnectInternal anymore
This commit is contained in:
parent
dec47b7b7d
commit
3313fa9c43
@ -632,11 +632,6 @@ public void StopClient()
|
|||||||
// NetworkClient.OnTransportDisconnect
|
// NetworkClient.OnTransportDisconnect
|
||||||
// NetworkManager.OnClientDisconnect
|
// NetworkManager.OnClientDisconnect
|
||||||
NetworkClient.Disconnect();
|
NetworkClient.Disconnect();
|
||||||
|
|
||||||
// UNET invoked OnDisconnected cleanup immediately.
|
|
||||||
// let's keep it for now, in case any projects depend on it.
|
|
||||||
// TODO simply remove this in the future.
|
|
||||||
OnClientDisconnectInternal();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// called when quitting the application by closing the window / pressing
|
// called when quitting the application by closing the window / pressing
|
||||||
|
@ -51,8 +51,12 @@ public void StartClientTest()
|
|||||||
[Test]
|
[Test]
|
||||||
public void StopClientTest()
|
public void StopClientTest()
|
||||||
{
|
{
|
||||||
|
manager.StartServer();
|
||||||
|
UpdateTransport();
|
||||||
manager.StartClient();
|
manager.StartClient();
|
||||||
|
UpdateTransport();
|
||||||
manager.StopClient();
|
manager.StopClient();
|
||||||
|
UpdateTransport();
|
||||||
|
|
||||||
Assert.That(manager.mode == NetworkManagerMode.Offline);
|
Assert.That(manager.mode == NetworkManagerMode.Offline);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user