src: do not crash if ToggleAsyncHook fails during termination
In the termination case, we should not crash. There’s also no harm being done by ignoring the termination exception here, since the thread is about to be torn down anyway. Also, add a guard against running this during shutdown. That is the likely cause of https://github.com/nodejs/node/issues/34361. Fixes: https://github.com/nodejs/node/issues/34361 PR-URL: https://github.com/nodejs/node/pull/34362 Fixes: https://github.com/nodejs/node/issues/27261 Reviewed-By:Gus Caplan <me@gus.host> Reviewed-By:
Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com>
parent
8f0a7465
Please register or sign in to comment