From c8fcf81908cf3f019a0b3d7258f520401c1f1c90 Mon Sep 17 00:00:00 2001 From: Feross Aboukhadijeh Date: Mon, 27 Jul 2015 15:28:23 -0700 Subject: [PATCH] fix for node 0.10 --- lib/udp-tracker.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/udp-tracker.js b/lib/udp-tracker.js index 30d1e11..bbd5eb3 100644 --- a/lib/udp-tracker.js +++ b/lib/udp-tracker.js @@ -219,7 +219,7 @@ UDPTracker.prototype._request = function (opts) { toUInt64(opts.downloaded), opts.left != null ? toUInt64(opts.left) : new Buffer('FFFFFFFFFFFFFFFF', 'hex'), toUInt64(opts.uploaded), - common.toUInt32(common.EVENTS[opts.event]), + common.toUInt32(common.EVENTS[opts.event] || 0), common.toUInt32(0), // ip address (optional) common.toUInt32(0), // key (optional) common.toUInt32(opts.numwant),