Skip to content

Commit 96a3cac

Browse files
authored
Merge pull request #66 from nerif-tafu/master
Changed isConnected to better reflect actual socket state.
2 parents e1900e4 + 3c3fcbc commit 96a3cac

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)