private void CloseConnection() { if (this.persistance != null) { this.persistance.Dispose(); this.persistance = (UserPersistance)null; } EACServer.DoShutdown(); ((Network.Server)Network.Net.sv).callbackHandler = null; using (TimeWarning.New("sv.Stop", 0.1f)) ((Network.Server)Network.Net.sv).Stop("Shutting Down"); using (TimeWarning.New("RCon.Shutdown", 0.1f)) RCon.Shutdown(); using (TimeWarning.New("Steamworks.GameServer.Shutdown", 0.1f)) { if (Global.get_SteamServer() == null) { return; } Debug.Log((object)"Steamworks Shutting Down"); ((BaseSteamworks)Global.get_SteamServer()).Dispose(); Global.set_SteamServer((Facepunch.Steamworks.Server)null); Debug.Log((object)"Okay"); } }
private void CloseConnection() { if (this.persistance != null) { this.persistance.Dispose(); this.persistance = null; } EACServer.DoShutdown(); Network.Net.sv.callbackHandler = null; using (TimeWarning timeWarning = TimeWarning.New("sv.Stop", 0.1f)) { Network.Net.sv.Stop("Shutting Down"); } using (timeWarning = TimeWarning.New("RCon.Shutdown", 0.1f)) { RCon.Shutdown(); } using (timeWarning = TimeWarning.New("Steamworks.GameServer.Shutdown", 0.1f)) { if (SteamServer.IsValid) { UnityEngine.Debug.Log("Steamworks Shutting Down"); SteamServer.Shutdown(); UnityEngine.Debug.Log("Okay"); } } }