mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 00:23:30 +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
|
||||
this.debug(`Manager was destroyed. Called by:\n${new Error().stack}`);
|
||||
this.destroyed = true;
|
||||
this._ws.destroy({ code: CloseCodes.Normal });
|
||||
this._ws?.destroy({ code: CloseCodes.Normal });
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user