Skip to content

Commit cc4c73e

Browse files
committed
Revert "udp client: unref the socket"
This reverts commit 6f1aa98. Conflicts: index.js
1 parent 14034c2 commit cc4c73e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,9 @@ Tracker.prototype._requestUdp = function (requestUrl, opts) {
170170
var socket = dgram.createSocket('udp4')
171171
var transactionId = new Buffer(hat(32), 'hex')
172172

173-
socket.unref()
173+
var timeout = setTimeout(function () {
174+
error('tracker request timed out')
175+
}, 15000)
174176

175177
if (opts.event !== EVENTS.stopped) {
176178
// if we're sending a stopped message, we don't really care if it arrives, so don't

0 commit comments

Comments
 (0)