Mirror/Assets
MrGadget 32fdd5215f
fix: Prevent recursion overflow when stopping (#2833)
* fix: Prevent recursion overflow when stopping
Calling StopServer from OnStartServer or StopClient from OnStopClient (or from user code invoked from those virtual methods) would create a recursion overflow.

This PR moves the setting of `isNetworkActive = false;` up above the virtual method calls in both cases, and adds a check to early out if false to prevent recursion and overflow.

Debug logs were also moved up nearer the top of the method.

Fixes: #2080

* Update Assets/Mirror/Runtime/NetworkManager.cs

* Update Assets/Mirror/Runtime/NetworkManager.cs

Co-authored-by: vis2k <info@noobtuts.com>
2021-07-15 13:18:55 +08:00
..
Mirror fix: Prevent recursion overflow when stopping (#2833) 2021-07-15 13:18:55 +08:00
ScriptTemplates fix: Network Authentators: Removed NetworkConnection parameter (#2703) 2021-04-30 09:33:17 +08:00
Mirror.meta Source based instead of dll (#277) 2019-01-13 21:08:54 +01:00
ScriptTemplates.meta feat: Add ScriptTemplates to repo and package (#2559) 2021-02-05 09:34:22 +08:00