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`
This commit is contained in:
BannerBomb
2021-02-10 09:48:16 -05:00
committed by GitHub
parent cee6cf70ce
commit 56d8b445ed

View File

@@ -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;
}