Skip to content

Commit

Permalink
Check that WS connection is open before closing it on 'websocketFaile…
Browse files Browse the repository at this point in the history
…d'. Fixes facebook#3346
  • Loading branch information
yzarubin committed Oct 11, 2015
1 parent 7202288 commit 26e8a5c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Libraries/WebSocket/WebSocket.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ class WebSocket extends WebSocketBase {
this.onerror && this.onerror(event);
this.dispatchEvent(event);
this._unregisterEvents();
this._closeWebSocket(id);
this.readyState === this.OPEN && this._closeWebSocket(id);
})
];
}
Expand Down

0 comments on commit 26e8a5c

Please sign in to comment.