Skip to content

Commit 8aba871

Browse files
committedJul 11, 2018
[fix] Fix use after invalidation bug
Fixes #1418
1 parent 175ce46 commit 8aba871

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

‎lib/websocket.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -753,7 +753,6 @@ function socketOnClose () {
753753

754754
this.removeListener('close', socketOnClose);
755755
this.removeListener('end', socketOnEnd);
756-
this[kWebSocket] = undefined;
757756

758757
websocket.readyState = WebSocket.CLOSING;
759758

@@ -771,6 +770,8 @@ function socketOnClose () {
771770
websocket._receiver.end();
772771

773772
this.removeListener('data', socketOnData);
773+
this[kWebSocket] = undefined;
774+
774775
clearTimeout(websocket._closeTimer);
775776

776777
if (

0 commit comments

Comments
 (0)
Please sign in to comment.