Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
unrefing timeout to not hang on stop
  • Loading branch information
mafintosh committed Mar 28, 2014
commit ff289c6b23ea03a02ee578deeae5fcb6b8a3ea30
4 changes: 4 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,10 @@ Client.prototype._requestUdp = function (announceUrl, opts) {
error('tracker request timed out')
}, 15000)

if (timeout.unref) {
timeout.unref()
}

function error (message) {
self.emit('error', new Error(message))
socket.close()
Expand Down