Check readyState against constant WebSocket.OPEN
This commit is contained in:
parent
bdda61fc73
commit
5122a8a4ce
|
|
@ -175,7 +175,7 @@ function Websock() {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this._websocket.bufferedAmount < this.maxBufferedAmount) {
|
if (this._websocket.bufferedAmount < this.maxBufferedAmount) {
|
||||||
if (this._sQ.length > 0 && this._websocket.readyState === 1) {
|
if (this._sQ.length > 0 && this._websocket.readyState === WebSocket.OPEN) {
|
||||||
this._websocket.send(this._encode_message());
|
this._websocket.send(this._encode_message());
|
||||||
this._sQ = [];
|
this._sQ = [];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue