Skip to content

Commit

Permalink
fix(WebSocketShard): key name in WebSocketShard#_send. (#5304)
Browse files Browse the repository at this point in the history
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`
  • Loading branch information
BannerBomb committed Feb 10, 2021
1 parent cee6cf7 commit 56d8b44
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/client/websocket/WebSocketShard.js
Expand Up @@ -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;
}

Expand Down

0 comments on commit 56d8b44

Please sign in to comment.