Skip to content

Commit

Permalink
fix(Client): safe call for possibly null WebSocket (#9600)
Browse files Browse the repository at this point in the history
fix(client): safe call for possibly null Websocket
  • Loading branch information
nopeless committed May 26, 2023
1 parent e1b6eee commit 24a6149
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
}

/**
Expand Down

0 comments on commit 24a6149

Please sign in to comment.