Skip to content

Commit

Permalink
Only reset sessionID when close code is 1000 or 4006 (discordjs#3213)
Browse files Browse the repository at this point in the history
* Event code 1001 should not get its sessionID reset

* Reset sessionID when close code is 1000 or 4006
  • Loading branch information
Deivu authored and samsamson33 committed Feb 27, 2020
1 parent e453721 commit ac4b7ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/client/websocket/WebSocketManager.js
Expand Up @@ -216,7 +216,7 @@ class WebSocketManager {
return;
}

if (event.code >= 1000 && event.code <= 2000) {
if (event.code === 1000 || event.code === 4006) {
// Any event code in this range cannot be resumed.
shard.sessionID = undefined;
}
Expand Down

0 comments on commit ac4b7ca

Please sign in to comment.