mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
fix(WebSocketShard): only cleanup the connection if a connection still exists (#8946)
fix(WebSocketShard): only cleanup if connection
This commit is contained in:
@@ -603,7 +603,9 @@ class WebSocketShard extends EventEmitter {
|
||||
);
|
||||
|
||||
// Cleanup connection listeners
|
||||
this._cleanupConnection();
|
||||
if (this.connection) {
|
||||
this._cleanupConnection();
|
||||
}
|
||||
|
||||
this.emitClose();
|
||||
// Setting the variable false to check for zombie connections.
|
||||
|
||||
Reference in New Issue
Block a user