Browse Source

fix: Cancel reconnection when 4014 (#1603)

* Cancel reconnection when 4014

* Missed an else
tags/2.3.0
Paulo GitHub 4 years ago
parent
commit
f396cd9b92
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      src/Discord.Net.WebSocket/ConnectionManager.cs

+ 2
- 0
src/Discord.Net.WebSocket/ConnectionManager.cs View File

@@ -44,6 +44,8 @@ namespace Discord
var ex2 = ex as WebSocketClosedException;
if (ex2?.CloseCode == 4006)
CriticalError(new Exception("WebSocket session expired", ex));
else if (ex2?.CloseCode == 4014)
CriticalError(new Exception("WebSocket connection was closed", ex));
else
Error(new Exception("WebSocket connection was closed", ex));
}


Loading…
Cancel
Save