Skip to content

Commit 36a4c22

Browse files
committed
null out bound functions
1 parent bd92a82 commit 36a4c22

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

server.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -622,9 +622,15 @@ Server.prototype._onWebSocketClose = function (socket) {
622622
socket.peerId = null
623623
socket.infoHashes = null
624624
socket.onSend = null
625+
625626
socket.removeListener('message', socket.onMessageBound)
627+
socket.onMessageBound = null
628+
626629
socket.removeListener('error', socket.onErrorBound)
630+
socket.onErrorBound = null
631+
627632
socket.removeListener('close', socket.onCloseBound)
633+
socket.onCloseBound = null
628634
}
629635

630636
Server.prototype._onWebSocketError = function (socket, err) {

0 commit comments

Comments
 (0)