fix: NetworkServer.DisconnectAll doesn't set inactive anymore. it should simply "disconnect all" connections.

otherwise Shutdown may not be able to properly clean up all objects.
prepares to fix #3344
This commit is contained in:
vis2k 2023-01-12 11:44:57 +01:00
parent c04eeacba6
commit 74e6b72239

View File

@ -860,7 +860,11 @@ public static void DisconnectAll()
// cleanup // cleanup
connections.Clear(); connections.Clear();
localConnection = null; localConnection = null;
active = false; // this used to set active=false.
// however, then Shutdown can't properly destroy objects:
// https://github.com/MirrorNetworking/Mirror/issues/3344
// "DisconnectAll" should only disconnect all, not set inactive.
// active = false;
} }
// add/remove/replace player /////////////////////////////////////////// // add/remove/replace player ///////////////////////////////////////////