fix(WebSocketShard): only cleanup the connection if a connection still exists (#8946)

fix(WebSocketShard): only cleanup if connection
This commit is contained in:
Qjuh
2022-12-18 16:18:07 +01:00
committed by GitHub
parent 0cf29abcf0
commit 5eab5fc06c

View File

@@ -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.