diff --git a/lib/bunyan.js b/lib/bunyan.js index f4b5c76..696cdf8 100644 --- a/lib/bunyan.js +++ b/lib/bunyan.js @@ -1016,6 +1016,9 @@ RotatingFileStream.prototype._setupNextRot = function () { this.timeout = setTimeout( function () { self.rotate(); }, this.rotAt - Date.now()); + if (typeof this.timeout.unref === 'function') { + this.timeout.unref(); + } } RotatingFileStream.prototype._nextRotTime = function _nextRotTime(first) {