async_hooks,http: fix socket reuse with Agent
Under very specific circumstances the http
implementation could be brought to crash, because the Agent did not re-assign the async id field properly after setting up a socket for reuse.
Fixes: https://github.com/nodejs/node/issues/13325
/cc @nodejs/async_hooks and @trott because this is a somewhat complex test file
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
commit message follows commit guidelines
Affected core subsystem(s)
http, async_hooks