From 206c699844148728f6b44d154da62ac8466d35fd Mon Sep 17 00:00:00 2001 From: March 7th <71698422+aiko-chan-ai@users.noreply.github.com> Date: Fri, 17 Jun 2022 12:48:31 +0700 Subject: [PATCH] fix: destroy options during cleanup v13.8.1 --- src/client/websocket/WebSocketShard.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/websocket/WebSocketShard.js b/src/client/websocket/WebSocketShard.js index 6d4bd58..8ad3626 100644 --- a/src/client/websocket/WebSocketShard.js +++ b/src/client/websocket/WebSocketShard.js @@ -367,7 +367,7 @@ class WebSocketShard extends EventEmitter { if (this.connection) { this._cleanupConnection(); // Having this after _cleanupConnection to just clean up the connection and not listen to ws.onclose - this.destroy({ reset: true, emit: false, log: false }); + this.destroy({ reset: !this.sessionId, emit: false, log: false }); } this.status = Status.DISCONNECTED; this.emitClose(event);