mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-12-06 17:27:59 +00:00
Add conditional to timer.unref
This commit is contained in:
@@ -456,7 +456,7 @@ class Connection extends EventEmitter {
|
||||
this._whenReady(this._send(message)).then(() => {
|
||||
const delay = timeout || this._timeout
|
||||
timer = setTimeout(() => _reject(new TimeoutError()), delay)
|
||||
timer.unref()
|
||||
if (timer.unref) timer.unref()
|
||||
}).catch(_reject)
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user