diff --git a/reconnecting-websocket.js b/reconnecting-websocket.js index 0cd4332..ea8b859 100644 --- a/reconnecting-websocket.js +++ b/reconnecting-websocket.js @@ -208,6 +208,7 @@ this.open = function (reconnectAttempt) { ws = new WebSocket(self.url, protocols || []); ws.binaryType = this.binaryType; + forcedClose = false; if (reconnectAttempt) { if (this.maxReconnectAttempts && this.reconnectAttempts > this.maxReconnectAttempts) {