You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With v2.0.3, invoking the exported log disables the hook. I needed a more complete picture of what was going on during closing of an application because the answer to "why is node running" kept changing. Hence, I tried to sample open handlers as shown below.
for(leti=0;i<10;i++){setTimeout(log,(i+1)*500);}
However, this was obviously not possible. It worked with the following patch, in case anyone also needs this, and I am lightly suggesting it as an addition.
--- index.js+++ index.js@@ -23,9 +23,8 @@
function whyIsNodeRunning (logger) {
if (!logger) logger = console
- hook.disable()
logger.error('There are %d handle(s) keeping the process running', active.size)
- for (const o of active.values()) printStacks(o)+ for (const o of [...active.values()]) printStacks(o)
function printStacks (o) {
var stacks = o.stacks.slice(1).filter(function (s) {
The text was updated successfully, but these errors were encountered:
With v2.0.3, invoking the exported log disables the hook. I needed a more complete picture of what was going on during closing of an application because the answer to "why is node running" kept changing. Hence, I tried to sample open handlers as shown below.
However, this was obviously not possible. It worked with the following patch, in case anyone also needs this, and I am lightly suggesting it as an addition.
The text was updated successfully, but these errors were encountered: