mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-17 12:03:31 +01:00
fix(Client): safe call for possibly null WebSocket (#9600)
fix(client): safe call for possibly null Websocket
This commit is contained in:
@@ -325,7 +325,7 @@ class WebSocketManager extends EventEmitter {
|
|||||||
// TODO: Make a util for getting a stack
|
// TODO: Make a util for getting a stack
|
||||||
this.debug(`Manager was destroyed. Called by:\n${new Error().stack}`);
|
this.debug(`Manager was destroyed. Called by:\n${new Error().stack}`);
|
||||||
this.destroyed = true;
|
this.destroyed = true;
|
||||||
this._ws.destroy({ code: CloseCodes.Normal });
|
this._ws?.destroy({ code: CloseCodes.Normal });
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user