Skip to content

Commit

Permalink
Merge pull request #419 from MathMan05/patch-1
Browse files Browse the repository at this point in the history
Maybe fix DDOS
  • Loading branch information
Puyodead1 authored Dec 18, 2024
2 parents c480f86 + 0ad9e0f commit fa81a96
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/stores/GatewayConnectionStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,12 @@ export default class GatewayConnectionStore {
this.logger.debug(`[Disconnect] ${this.url}`);
this.socket?.close(code, reason);
}

reconnecting=false;
startReconnect() {
if(this.reconnecting)return;
this.reconnecting=true;
setTimeout(() => {
this.reconnecting=false;
this.logger.debug("Starting reconnect...");
this.connect(this.url!);
}, this.reconnectTimeout);
Expand Down

0 comments on commit fa81a96

Please sign in to comment.