client/websocket: warning on invalid info_hash

This commit is contained in:
Feross Aboukhadijeh 2015-03-29 20:40:21 +13:00
parent b269fb9db4
commit df8de6f608

View File

@ -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)