diff --git a/Assets/Mirror/Transports/SimpleWeb/SimpleWebTransport.cs b/Assets/Mirror/Transports/SimpleWeb/SimpleWebTransport.cs index 71a905804..aefcbe5f9 100644 --- a/Assets/Mirror/Transports/SimpleWeb/SimpleWebTransport.cs +++ b/Assets/Mirror/Transports/SimpleWeb/SimpleWebTransport.cs @@ -149,7 +149,7 @@ public override void ClientConnect(Uri uri) // connecting or connected if (ClientConnected()) { - Log.Error("[SimpleWebTransport] Already Connected"); + Log.Warn("[SimpleWebTransport] Already Connected"); return; } @@ -241,7 +241,7 @@ public override bool ServerActive() public override void ServerStart() { if (ServerActive()) - Log.Error("[SimpleWebTransport] Server Already Started"); + Log.Warn("[SimpleWebTransport] Server Already Started"); SslConfig config = SslConfigLoader.Load(sslEnabled, sslCertJson, sslProtocols); server = new SimpleWebServer(serverMaxMessagesPerTick, TcpConfig, maxMessageSize, handshakeMaxSize, config); @@ -259,19 +259,17 @@ public override void ServerStart() public override void ServerStop() { - if (!ServerActive()) - Log.Error("[SimpleWebTransport] Server Not Active"); - - server.Stop(); - server = null; + if (ServerActive()) + { + server.Stop(); + server = null; + } } public override void ServerDisconnect(int connectionId) { - if (!ServerActive()) - Log.Error("[SimpleWebTransport] Server Not Active"); - - server.KickClient(connectionId); + if (ServerActive()) + server.KickClient(connectionId); } public override void ServerSend(int connectionId, ArraySegment segment, int channelId)