From 2de4c488e1b211192f6b9c2045e8f3f419dc4a45 Mon Sep 17 00:00:00 2001 From: Quin Lynch Date: Tue, 5 Apr 2022 15:21:39 -0300 Subject: [PATCH] Update ConnectionManager.cs --- src/Discord.Net.WebSocket/ConnectionManager.cs | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/Discord.Net.WebSocket/ConnectionManager.cs b/src/Discord.Net.WebSocket/ConnectionManager.cs index ec5eb93eb..ef3d65c22 100644 --- a/src/Discord.Net.WebSocket/ConnectionManager.cs +++ b/src/Discord.Net.WebSocket/ConnectionManager.cs @@ -78,14 +78,15 @@ namespace Discord nextReconnectDelay = 1000; //Reset delay await _connectionPromise.Task.ConfigureAwait(false); } - catch (OperationCanceledException ex) - { - // Added back for log out / stop to client. The connection promise would cancel and it would be logged as an error, shouldn't be the case. - // ref #2026 - - Cancel(); //In case this exception didn't come from another Error call - await DisconnectAsync(ex, !reconnectCancelToken.IsCancellationRequested).ConfigureAwait(false); - } + // remove for testing. + //catch (OperationCanceledException ex) + //{ + // // Added back for log out / stop to client. The connection promise would cancel and it would be logged as an error, shouldn't be the case. + // // ref #2026 + + // Cancel(); //In case this exception didn't come from another Error call + // await DisconnectAsync(ex, !reconnectCancelToken.IsCancellationRequested).ConfigureAwait(false); + //} catch (Exception ex) { Error(ex); //In case this exception didn't come from another Error call