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