mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
fix(WebSocketShard): clear listeners on reconnect (#8927)
This commit is contained in:
@@ -602,6 +602,9 @@ class WebSocketShard extends EventEmitter {
|
||||
`[WebSocket] did not close properly, assuming a zombie connection.\nEmitting close and reconnecting again.`,
|
||||
);
|
||||
|
||||
// Cleanup connection listeners
|
||||
this._cleanupConnection();
|
||||
|
||||
this.emitClose();
|
||||
// Setting the variable false to check for zombie connections.
|
||||
this.closeEmitted = false;
|
||||
|
||||
Reference in New Issue
Block a user