This commit is contained in:
Feross Aboukhadijeh 2015-01-28 18:09:23 -08:00
parent ebb86f728f
commit a6f14037ff
2 changed files with 6 additions and 3 deletions

View File

@ -305,7 +305,7 @@ Tracker.prototype._requestUdp = function (requestUrl, opts) {
socket.on('message', function (msg) {
if (msg.length < 8 || msg.readUInt32BE(4) !== transactionId.readUInt32BE(0)) {
return error('tracker sent back invalid transaction id')
return error('tracker sent invalid transaction id')
}
var action = msg.readUInt32BE(0)
@ -374,6 +374,10 @@ Tracker.prototype._requestUdp = function (requestUrl, opts) {
}
self.client.emit('error', new Error(msg.slice(8).toString()))
break
default:
error('tracker sent invalid action')
break
}
})

View File

@ -312,7 +312,6 @@ function makeUdpPacket (params) {
break
default:
throw new Error('Action not implemented: ' + params.action)
break
}
}
return packet
}