Skip to content

Commit

Permalink
🦺 chore: throw error when retry limit has reached
Browse files Browse the repository at this point in the history
  • Loading branch information
Helloyunho committed Nov 9, 2023
1 parent 1935cb7 commit 815224b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/src/gateway/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,10 @@ export class Gateway extends EventEmitter<GatewayEvents> {
this.retryCount++;
this.reconnect(!this.connectionError);
}, 500);
} else {
throw new Error(
`Gateway connection closed with code ${e.code}, retry limit reached(${this.retryCount})`,
);
}
break;
}
Expand Down

0 comments on commit 815224b

Please sign in to comment.