diff --git a/client.js b/client.js index 3513448..8d6df95 100644 --- a/client.js +++ b/client.js @@ -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 } }) diff --git a/server.js b/server.js index b2f6133..b3364a8 100644 --- a/server.js +++ b/server.js @@ -312,7 +312,6 @@ function makeUdpPacket (params) { break default: throw new Error('Action not implemented: ' + params.action) - break - } + } return packet }