-
Notifications
You must be signed in to change notification settings - Fork 30.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
res.destroy() not causing a close event on node v17 #40528
Labels
http
Issues or PRs related to the http subsystem.
Comments
Yea it should probably be |
Work for me. Thanks! |
ronag
added a commit
to nxtedition/node
that referenced
this issue
Oct 21, 2021
ronag
added a commit
to nxtedition/node
that referenced
this issue
Oct 21, 2021
devinivy
added a commit
to hapijs/hapi
that referenced
this issue
Nov 9, 2021
devinivy
added a commit
to hapijs/hapi
that referenced
this issue
Nov 13, 2021
* Set default DNS order for node v17 testing. Temporarily skip hanging test. * Fix test action for node v17 * No longer skip test, node v17 bug fixed nodejs/node#40528
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version
v17.0.0
Platform
Darwin my.host.local 18.6.0 Darwin Kernel Version 18.6.0: Thu Apr 25 23:16:27 PDT 2019; root:xnu-4903.261.4~2/RELEASE_X86_64 x86_64
Subsystem
No response
What steps will reproduce the bug?
How often does it reproduce? Is there a required condition?
It reproduces consistently 👍
What is the expected behavior?
The expected behavior is for the script to log
close
and then output a socket hangup error:What do you see instead?
Instead I see the socket hangup error, but the
'close'
event is not emitted, so we don't seeclose
logged to the console.Additional information
This was originally reproduced in the hapi test suite: https://github.com/hapijs/hapi/blob/c7cfa2e0f9c1d4ba94b4715a5a268356f68294b3/test/transmit.js#L1197-L1250
I believe this could be related to these areas within node:
node/lib/_http_outgoing.js
Lines 304 to 308 in 9125cfd
node/lib/_http_server.js
Lines 841 to 847 in 9125cfd
Notice that
destroyed
is set prior to destroying the socket, and then is checked later when deciding to emit'close'
. The check is new in v17, which may be why we see this change in behavior. Potentially related to this commit, though not confirmed: f4609bdThe text was updated successfully, but these errors were encountered: