Closed
Description
Up until node v10, process._getActiveHandles()
would show Timer objects that were keeping the process open.
For example:
$ node -v
v10.15.1
$ node -p 'setTimeout(_=>_,500);process._getActiveHandles().filter(h=>h!=process.stdout && h !=process.stderr)'
[ Timer {
_list:
TimersList {
_idleNext: [Timeout],
_idlePrev: [Timeout],
_unrefed: false,
msecs: 500,
_timer: [Circular] } } ]
However, in Node v11, this is not the case:
$ node -v
v11.8.0
$ node -p 'setTimeout(_=>_,500);process._getActiveHandles().filter(h=>h!=process.stdout && h !=process.stderr)'
[]
Is there a better or more canonical way to get insight into what's keeping the process from exiting gracefully? Or is this a bug?