diff --git a/lib/client/websocket-tracker.js b/lib/client/websocket-tracker.js index 15435dc..2eaf420 100644 --- a/lib/client/websocket-tracker.js +++ b/lib/client/websocket-tracker.js @@ -73,6 +73,8 @@ WebSocketTracker.prototype.destroy = function (onclose) { self.destroyed = true clearInterval(self.interval) + socketPool[self.announceUrl] = null + self.socket.removeListener('data', self._onSocketDataBound) self.socket.removeListener('close', self._onSocketCloseBound) self.socket.removeListener('error', self._onSocketErrorBound)