Browse Source

Cancel reconnection when 4014

pull/1603/head
Paulo 5 years ago
parent
commit
f0c2043b22
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; var ex2 = ex as WebSocketClosedException;
if (ex2?.CloseCode == 4006) if (ex2?.CloseCode == 4006)
CriticalError(new Exception("WebSocket session expired", ex)); CriticalError(new Exception("WebSocket session expired", ex));
if (ex2?.CloseCode == 4014)
CriticalError(new Exception("WebSocket connection was closed", ex));
else else
Error(new Exception("WebSocket connection was closed", ex)); Error(new Exception("WebSocket connection was closed", ex));
} }


Loading…
Cancel
Save