mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-18 12:33:30 +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.`,
|
`[WebSocket] did not close properly, assuming a zombie connection.\nEmitting close and reconnecting again.`,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Cleanup connection listeners
|
||||||
|
this._cleanupConnection();
|
||||||
|
|
||||||
this.emitClose();
|
this.emitClose();
|
||||||
// Setting the variable false to check for zombie connections.
|
// Setting the variable false to check for zombie connections.
|
||||||
this.closeEmitted = false;
|
this.closeEmitted = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user