NetworkServer.InternalDisconnectAll moved into DisconnectAll. The class can't be inherited from anymore, no need for an internal version here.

This commit is contained in:
vis2k 2018-12-30 23:00:36 +01:00
parent de59e32ce3
commit a0aa55da97

View File

@ -50,7 +50,7 @@ public static void Shutdown()
{ {
if (s_Initialized) if (s_Initialized)
{ {
InternalDisconnectAll(); DisconnectAll();
if (dontListen) if (dontListen)
{ {
@ -271,7 +271,17 @@ public static bool SendToReady(GameObject contextObj, short msgType, MessageBase
public static void DisconnectAll() public static void DisconnectAll()
{ {
InternalDisconnectAll(); DisconnectAllConnections();
if (s_LocalConnection != null)
{
s_LocalConnection.Disconnect();
s_LocalConnection.Dispose();
s_LocalConnection = null;
}
s_Active = false;
s_LocalClientActive = false;
} }
public static void DisconnectAllConnections() public static void DisconnectAllConnections()
@ -286,21 +296,6 @@ public static void DisconnectAllConnections()
connections.Clear(); connections.Clear();
} }
internal static void InternalDisconnectAll()
{
DisconnectAllConnections();
if (s_LocalConnection != null)
{
s_LocalConnection.Disconnect();
s_LocalConnection.Dispose();
s_LocalConnection = null;
}
s_Active = false;
s_LocalClientActive = false;
}
// The user should never need to pump the update loop manually // The user should never need to pump the update loop manually
internal static void Update() internal static void Update()
{ {