Unverified Commit d26a74dc authored by Anna Henningsen's avatar Anna Henningsen
Browse files

http,async_hooks: keep resource object alive from socket

If `asyncReset()` is used to specify an alternative resource object
to mark a re-used socket in the HTTP Agent implementation,
store that object and keep it alive, because domains rely on GC tracking
for resource objects to manage their own lifetimes, and previously that
resource object might have been garbage-collected too early, leading to
crashes.

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

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


Reviewed-By: default avatarVladimir de Turckheim <vlad2t@hotmail.com>
Reviewed-By: default avatarGireesh Punathil <gpunathi@in.ibm.com>
parent 0673dfc0
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