diff --git a/src/client/websocket/WebSocketShard.js b/src/client/websocket/WebSocketShard.js index 64ceca83ecb6..aff151bcff3a 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; }