Unverified Commit 04df3daa authored by Anna Henningsen's avatar Anna Henningsen
Browse files

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: default avatarGus Caplan <me@gus.host>
Reviewed-By: default avatarJoyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
parent 8f0a7465
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment