null out bound functions

This commit is contained in:
Feross Aboukhadijeh 2016-03-18 15:55:12 -07:00
parent bd92a827e1
commit 36a4c2208a

View File

@ -622,9 +622,15 @@ Server.prototype._onWebSocketClose = function (socket) {
socket.peerId = null
socket.infoHashes = null
socket.onSend = null
socket.removeListener('message', socket.onMessageBound)
socket.onMessageBound = null
socket.removeListener('error', socket.onErrorBound)
socket.onErrorBound = null
socket.removeListener('close', socket.onCloseBound)
socket.onCloseBound = null
}
Server.prototype._onWebSocketError = function (socket, err) {