fix(SWT): silenced silly error logs

This commit is contained in:
MrGadget1024 2023-11-22 12:53:58 -05:00
parent eb66d81c77
commit b9b80c4f93

View File

@ -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<byte> segment, int channelId)