Skip to content

Commit 4e1788d

Browse files
committed
Correctly detect unref'ed handles
At this point, Timeout objects aren't the only handles that have a hasRef() method. nodejs/node#42756 added hasRef() to the Worker handle object that gets reported by async_hooks, so we should consider that too. Fixes: mafintosh#59 Signed-off-by: Darshan Sen <[email protected]>
1 parent 24fb4c8 commit 4e1788d

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ function whyIsNodeRunning (logger) {
2727
hook.disable()
2828
var activeResources = [...active.values()].filter(function(r) {
2929
if (
30-
r.type === 'Timeout' &&
3130
typeof r.resource.hasRef === 'function'
3231
&& !r.resource.hasRef()
3332
) return false

0 commit comments

Comments
 (0)