mirror of
https://github.com/webtorrent/bittorrent-tracker.git
synced 2025-02-23 13:49:02 +00:00
unrefing timeout to not hang on stop
This commit is contained in:
parent
9a4688ff8e
commit
ff289c6b23
4
index.js
4
index.js
@ -150,6 +150,10 @@ Client.prototype._requestUdp = function (announceUrl, opts) {
|
|||||||
error('tracker request timed out')
|
error('tracker request timed out')
|
||||||
}, 15000)
|
}, 15000)
|
||||||
|
|
||||||
|
if (timeout.unref) {
|
||||||
|
timeout.unref()
|
||||||
|
}
|
||||||
|
|
||||||
function error (message) {
|
function error (message) {
|
||||||
self.emit('error', new Error(message))
|
self.emit('error', new Error(message))
|
||||||
socket.close()
|
socket.close()
|
||||||
|
Loading…
Reference in New Issue
Block a user