Connection Closed errors should include the exception obj

This commit is contained in:
RogueException
2016-08-17 21:28:06 -03:00
parent 3a086b4e6e
commit f8ae8bd9c3
3 changed files with 3 additions and 3 deletions

View File

@@ -86,7 +86,7 @@ namespace Discord.Audio
ApiClient.Disconnected += async ex => ApiClient.Disconnected += async ex =>
{ {
if (ex != null) if (ex != null)
await _audioLogger.WarningAsync($"Connection Closed: {ex.Message}").ConfigureAwait(false); await _audioLogger.WarningAsync($"Connection Closed", ex).ConfigureAwait(false);
else else
await _audioLogger.WarningAsync($"Connection Closed").ConfigureAwait(false); await _audioLogger.WarningAsync($"Connection Closed").ConfigureAwait(false);
}; };

View File

@@ -47,7 +47,7 @@ namespace Discord.Rpc
{ {
if (ex != null) if (ex != null)
{ {
await _rpcLogger.WarningAsync($"Connection Closed: {ex.Message}").ConfigureAwait(false); await _rpcLogger.WarningAsync($"Connection Closed", ex).ConfigureAwait(false);
await StartReconnectAsync(ex).ConfigureAwait(false); await StartReconnectAsync(ex).ConfigureAwait(false);
} }
else else

View File

@@ -92,7 +92,7 @@ namespace Discord.WebSocket
{ {
if (ex != null) if (ex != null)
{ {
await _gatewayLogger.WarningAsync($"Connection Closed: {ex.Message}").ConfigureAwait(false); await _gatewayLogger.WarningAsync($"Connection Closed", ex).ConfigureAwait(false);
await StartReconnectAsync(ex).ConfigureAwait(false); await StartReconnectAsync(ex).ConfigureAwait(false);
} }
else else