mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 11:00:32 +00:00
Network client stale pause message handling (#130)
* Fixes 2 bugs: NetworkServer.cs was not clearing connections on stopping. This meant when then starting again it was trying to communicate with old connections. Simply clear the list in DisconnectAllConnections. Also put in InternalListen for just in case as there should never be any connections at that point. NetworkClient.cs was unable to load the scene on connect under certain circumstances. This was because NetworkClient.pauseMessageHandling had been set to false on a previous failed connection attempt. On a subsequent connect it would then never accept messages after it connected successfully so didnt know to load the scene. Simple fix to set NetworkClient.pauseMessageHandling to false when connecting. It should never be true at this point. * split 2 fixes into 2 branches NetworkClient.cs was unable to load the scene on connect under certain circumstances. This was because NetworkClient.pauseMessageHandling had been set to false on a previous failed connection attempt. On a subsequent connect it would then never accept messages after it connected successfully so didnt know to load the scene. Simple fix to set NetworkClient.pauseMessageHandling to false when connecting. It should never be true at this point.
This commit is contained in:
parent
0b6479727b
commit
525600b56d
@ -112,6 +112,7 @@ void PrepareForConnect()
|
||||
SetActive(true);
|
||||
RegisterSystemHandlers(false);
|
||||
m_ClientId = 0;
|
||||
NetworkClient.pauseMessageHandling = false;
|
||||
}
|
||||
|
||||
public virtual void Disconnect()
|
||||
|
Loading…
Reference in New Issue
Block a user