unref timer so it doesnt hang the node process

This commit is contained in:
Jim Greenleaf
2017-06-19 15:30:49 -04:00
parent de47263087
commit 0c98082b25

View File

@@ -441,6 +441,7 @@ class Connection extends EventEmitter {
this._whenReady(this._send(message)).then(() => {
const delay = timeout || this._timeout
timer = setTimeout(() => _reject(new TimeoutError()), delay)
timer.unref()
}).catch(_reject)
})
}