responses corresponding to requests queued by http agent are attached to incorrect domain #25460
Labels
domain
Issues and PRs related to the domain subsystem.
help wanted
Issues that need assistance from volunteers or PRs that need help to proceed.
http
Issues or PRs related to the http subsystem.
Running the following code:
exits with a status code of 1 when I'd expect it to exit with a status code of 0:
In this repro, we basically force the http agent to queue the second request. When the first request finishes, the second request is assigned a socket from the agent's
'free'
event handler.However, it seems that event handler's execution is scheduled from within the lifecycle of the first request, and thus its active domain is the one of the first request.
As a result, when the parser for the response is instantiated and its corresponding async resource is initialized, it is attached to the first request's domain, and not to the active domain when the http request was originally created.
I'll see if I can put together a PR that fixes this.
The text was updated successfully, but these errors were encountered: