Browse Source

Improved websocket error logging

tags/docs-0.9
RogueException 9 years ago
parent
commit
4f313ecfa6
1 changed files with 5 additions and 1 deletions
  1. +5
    -1
      src/Discord.Net/Net/WebSockets/WebSocket.cs

+ 5
- 1
src/Discord.Net/Net/WebSockets/WebSocket.cs View File

@@ -127,7 +127,11 @@ namespace Discord.Net.WebSockets

if (oldState == ConnectionState.Connected)
{
Logger.Info("Disconnected");
var ex = _taskManager.Exception;
if (ex == null)
Logger.Info("Disconnected");
else
Logger.Error("Disconnected", ex);
OnDisconnected(_taskManager.WasUnexpected, _taskManager.Exception);
}
State = ConnectionState.Disconnected;


Loading…
Cancel
Save