diff --git a/include/websock.js b/include/websock.js index cc82e5a2..8e0660e7 100644 --- a/include/websock.js +++ b/include/websock.js @@ -175,7 +175,7 @@ function Websock() { } if (this._websocket.bufferedAmount < this.maxBufferedAmount) { - if (this._sQ.length > 0) { + if (this._sQ.length > 0 && this._websocket.readyState === 1) { this._websocket.send(this._encode_message()); this._sQ = []; }