Skip to content

Commit

Permalink
🩹 fix: maybe separate the case
Browse files Browse the repository at this point in the history
  • Loading branch information
Helloyunho committed Nov 9, 2023
1 parent 9832ec6 commit 1935cb7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion core/src/gateway/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,10 @@ export class Gateway extends EventEmitter<GatewayEvents> {
case GatewayCloseCode.INVALID_INTENT:
case GatewayCloseCode.DISALLOWED_INTENT:
case GatewayCloseCode.AUTHENTICATION_FAILED:
this.emit("CLOSED", e.code, false, true);
break;
default:
this.emit("CLOSED", e.code, this.retryCount < 5, false);
this.emit("CLOSED", e.code, this.retryCount < 5, !this.connectionError);
if (!this.reconnecting && this.retryCount < 5) {
setTimeout(() => {
this.retryCount++;
Expand Down

0 comments on commit 1935cb7

Please sign in to comment.