fix: Cancel reconnection when 4014 (#1603)

* Cancel reconnection when 4014

* Missed an else
This commit is contained in:
Paulo
2020-10-14 19:23:00 -03:00
committed by GitHub
parent e3925a77a3
commit f396cd9b92

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));
}