mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-16 11:33:30 +01:00
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:
@@ -648,7 +648,7 @@ class WebSocketShard extends EventEmitter {
|
|||||||
_send(data) {
|
_send(data) {
|
||||||
if (!this.connection || this.connection.readyState !== WebSocket.OPEN) {
|
if (!this.connection || this.connection.readyState !== WebSocket.OPEN) {
|
||||||
this.debug(`Tried to send packet '${JSON.stringify(data)}' but no WebSocket is available!`);
|
this.debug(`Tried to send packet '${JSON.stringify(data)}' but no WebSocket is available!`);
|
||||||
this.destroy({ close: 4000 });
|
this.destroy({ closeCode: 4000 });
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user