From a0aa55da972c8e58b6bb7dd34f5f72598e14a7e6 Mon Sep 17 00:00:00 2001 From: vis2k Date: Sun, 30 Dec 2018 23:00:36 +0100 Subject: [PATCH] NetworkServer.InternalDisconnectAll moved into DisconnectAll. The class can't be inherited from anymore, no need for an internal version here. --- Mirror/Runtime/NetworkServer.cs | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/Mirror/Runtime/NetworkServer.cs b/Mirror/Runtime/NetworkServer.cs index 8cf10d994..cf8134b55 100644 --- a/Mirror/Runtime/NetworkServer.cs +++ b/Mirror/Runtime/NetworkServer.cs @@ -50,7 +50,7 @@ public static void Shutdown() { if (s_Initialized) { - InternalDisconnectAll(); + DisconnectAll(); if (dontListen) { @@ -271,7 +271,17 @@ public static bool SendToReady(GameObject contextObj, short msgType, MessageBase 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() @@ -286,21 +296,6 @@ public static void DisconnectAllConnections() 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 internal static void Update() {