From cc4c73ec243a4238f91377c0a9f7f185acca87fe Mon Sep 17 00:00:00 2001 From: Feross Aboukhadijeh Date: Fri, 23 May 2014 20:44:48 -0700 Subject: [PATCH] Revert "udp client: unref the socket" This reverts commit 6f1aa981d42169c794b97879bbc2d3e6cf3c8d5d. Conflicts: index.js --- index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index fc37075..0dd651f 100644 --- a/index.js +++ b/index.js @@ -170,7 +170,9 @@ Tracker.prototype._requestUdp = function (requestUrl, opts) { var socket = dgram.createSocket('udp4') var transactionId = new Buffer(hat(32), 'hex') - socket.unref() + var timeout = setTimeout(function () { + error('tracker request timed out') + }, 15000) if (opts.event !== EVENTS.stopped) { // if we're sending a stopped message, we don't really care if it arrives, so don't