Skip to content

Commit

Permalink
Merge pull request #66 from nerif-tafu/master
Browse files Browse the repository at this point in the history
Changed isConnected to better reflect actual socket state.
  • Loading branch information
liamcottle authored Feb 14, 2024
2 parents e1900e4 + 3c3fcbc commit 96a3cac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rustplus.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ class RustPlus extends EventEmitter {
* @returns {boolean}
*/
isConnected() {
return this.websocket != null;
return (this.websocket.readyState === WebSocket.OPEN);
}

/**
Expand Down

0 comments on commit 96a3cac

Please sign in to comment.