Skip to content

Commit 3c3fcbc

Browse files
committed
Changed isConnected to better reflect actual socket state.
1 parent e1900e4 commit 3c3fcbc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rustplus.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ class RustPlus extends EventEmitter {
125125
* @returns {boolean}
126126
*/
127127
isConnected() {
128-
return this.websocket != null;
128+
return (this.websocket.readyState === WebSocket.OPEN);
129129
}
130130

131131
/**

0 commit comments

Comments
 (0)