From 56d8b445ede6c7915aec173a68905cda3d91f0ca Mon Sep 17 00:00:00 2001 From: BannerBomb Date: Wed, 10 Feb 2021 09:48:16 -0500 Subject: [PATCH] fix(WebSocketShard): key name in WebSocketShard#_send. (#5304) I just changed an incorrect key name that was introduced in Pull Request #3722. When destroying the websocket from the WebSocketShard#_send method it's using `close` as the key name instead of `closeCode` --- 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 64ceca83e..aff151bcf 100644 --- a/src/client/websocket/WebSocketShard.js +++ b/src/client/websocket/WebSocketShard.js @@ -648,7 +648,7 @@ class WebSocketShard extends EventEmitter { _send(data) { if (!this.connection || this.connection.readyState !== WebSocket.OPEN) { this.debug(`Tried to send packet '${JSON.stringify(data)}' but no WebSocket is available!`); - this.destroy({ close: 4000 }); + this.destroy({ closeCode: 4000 }); return; }