Skip to content

Commit

Permalink
fix: unref setTimeout in pool
Browse files Browse the repository at this point in the history
As a library don't block the process quit. Simply `unref` all the `setTimeout`s.
  • Loading branch information
nomagick authored Aug 3, 2022
1 parent 7af3338 commit e94fd37
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Pool.js
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ class Pool extends EventEmitter {
this._scheduledEviction = setTimeout(() => {
this._evict();
this._scheduleEvictorRun();
}, this._config.evictionRunIntervalMillis);
}, this._config.evictionRunIntervalMillis).unref();
}
}

Expand Down

0 comments on commit e94fd37

Please sign in to comment.