WebSocketSharp OnError doesn't always give us an exception
This commit is contained in:
@@ -51,7 +51,7 @@ namespace Discord.Net.WebSockets
|
||||
};
|
||||
_webSocket.OnError += async (s, e) =>
|
||||
{
|
||||
_parent.RaiseOnLog(LogMessageSeverity.Error, e.Exception.GetBaseException().Message);
|
||||
_parent.RaiseOnLog(LogMessageSeverity.Error, e.Exception?.GetBaseException()?.Message ?? e.Message);
|
||||
await _parent.DisconnectInternal(e.Exception, skipAwait: true).ConfigureAwait(false);
|
||||
};
|
||||
_webSocket.OnClose += async (s, e) =>
|
||||
|
||||
Reference in New Issue
Block a user