Skip to content

Commit ff289c6

Browse files
committed
unrefing timeout to not hang on stop
1 parent 9a4688f commit ff289c6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,10 @@ Client.prototype._requestUdp = function (announceUrl, opts) {
150150
error('tracker request timed out')
151151
}, 15000)
152152

153+
if (timeout.unref) {
154+
timeout.unref()
155+
}
156+
153157
function error (message) {
154158
self.emit('error', new Error(message))
155159
socket.close()

0 commit comments

Comments
 (0)