Skip to content

Commit

Permalink
Revert "[minor] Remove unneeded if statement"
Browse files Browse the repository at this point in the history
This reverts commit 297f56d.
  • Loading branch information
lpinca committed Jul 5, 2019
1 parent db14864 commit dbacf58
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/websocket.js
Expand Up @@ -901,6 +901,8 @@ function socketOnError() {
this.removeListener('error', socketOnError);
this.on('error', NOOP);

websocket.readyState = WebSocket.CLOSING;
this.destroy();
if (websocket) {
websocket.readyState = WebSocket.CLOSING;
this.destroy();
}
}

0 comments on commit dbacf58

Please sign in to comment.