We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1917961 commit 82f3879Copy full SHA for 82f3879
src/Discord.Net.WebSocket/ConnectionManager.cs
@@ -78,6 +78,14 @@ public virtual async Task StartAsync()
78
nextReconnectDelay = 1000; //Reset delay
79
await _connectionPromise.Task.ConfigureAwait(false);
80
}
81
+ catch (OperationCanceledException ex)
82
+ {
83
+ // 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.
84
+ // ref #2026
85
+
86
+ Cancel(); //In case this exception didn't come from another Error call
87
+ await DisconnectAsync(ex, !reconnectCancelToken.IsCancellationRequested).ConfigureAwait(false);
88
+ }
89
catch (Exception ex)
90
{
91
Error(ex); //In case this exception didn't come from another Error call
0 commit comments