Skip to content

Commit

Permalink
fix(ws): fixed using 1015 close code
Browse files Browse the repository at this point in the history
  • Loading branch information
seailz committed Sep 20, 2023
1 parent 382fc21 commit 86dd4d6
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ public boolean attemptReconnect(CloseStatus status) {
switch (status.getCode()) {
case 1012:
return true;
case 1011, 1015:
case 1011, 1015, 1003:
return false;
case 4000:
if (debug) logger.info("[Gateway] Connection was closed due to an unknown error. Will attempt reconnect.");
Expand Down Expand Up @@ -407,7 +407,7 @@ public void killConnection() throws IOException {
heartbeatManager = null;
readyForMessages = false;
// close connection
if (getSocket() != null && getSocket().getWs() != null) getSocket().getWs().close(CloseStatus.TLS_HANDSHAKE_FAILURE.getCode(), "Going away");
if (getSocket() != null && getSocket().getWs() != null) getSocket().getWs().close(CloseStatus.NOT_ACCEPTABLE.getCode(), "Going away");

if (debug) {
logger.info("[DISCORD.JAR - DEBUG] Connection closed.");
Expand Down

0 comments on commit 86dd4d6

Please sign in to comment.