Unverified Commit 6858c7e3 authored by Anna Henningsen's avatar Anna Henningsen
Browse files

async_hooks: only emit `after` for AsyncResource if stack not empty

We clear the async id stack inside the uncaught exception handler and
emit `after` events in the process, so we should not emit `after`
a second time from the `runInAsyncScope()` code.

This should match the behaviour we have in C++.

Fixes: https://github.com/nodejs/node/issues/30080

PR-URL: https://github.com/nodejs/node/pull/30087


Reviewed-By: default avatarGus Caplan <me@gus.host>
Reviewed-By: default avatarAnto Aravinth <anto.aravinth.cse@gmail.com>
parent cb36fa67
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