diff --git a/lib/websocket-tracker.js b/lib/websocket-tracker.js index d64f7f2..07d2b3e 100644 --- a/lib/websocket-tracker.js +++ b/lib/websocket-tracker.js @@ -86,7 +86,9 @@ WebSocketTracker.prototype._onSocketMessage = function (data) { return self.client.emit('warning', new Error('Invalid tracker response')) } - if (data.info_hash !== self.client._infoHash.toString('binary')) return + if (data.info_hash !== self.client._infoHash.toString('binary')) { + return self.client.emit('warning', new Error('Invalid tracker response')) + } debug('received %s from %s', JSON.stringify(data), self._announceUrl)