Skip to content

Commit b5e23ec

Browse files
Jiralitekyranet
andauthored
fix(Client): Ensure destroyed connections are not ready (#9942)
* fix(Client): ensure destroyed connections are not ready * refactor(Client): prefer `!` Co-authored-by: Aura <kyradiscord@gmail.com> --------- Co-authored-by: Aura <kyradiscord@gmail.com>
1 parent 81e7866 commit b5e23ec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/discord.js/src/client/Client.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ class Client extends BaseClient {
239239
* @returns {boolean}
240240
*/
241241
isReady() {
242-
return this.ws.status === Status.Ready;
242+
return !this.ws.destroyed && this.ws.status === Status.Ready;
243243
}
244244

245245
/**

0 commit comments

Comments
 (0)