Merge pull request #8 from mafintosh/unref

unrefing timeout to not hang on stop
This commit is contained in:
Feross Aboukhadijeh 2014-03-28 17:47:06 -07:00
commit 0b11b0be72

View File

@ -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()