Skip to content

Commit 1d52713

Browse files
committed
✨ use unref on timeouts
1 parent 685f97e commit 1d52713

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/SlidingTaskMap.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export class SlidingTaskMap<K, V> extends TaskMap<K, V> {
3434
if (ttl > 0 && ttl !== Number.POSITIVE_INFINITY) {
3535
const timeoutId = setTimeout(() => {
3636
this.delete(key);
37-
}, ttl);
37+
}, ttl).unref();
3838

3939
this.ttlMap.set(key, timeoutId);
4040
}

0 commit comments

Comments
 (0)