http: avoid aborting IncomingMessage signal on normal close - #64392
http: avoid aborting IncomingMessage signal on normal close#64392Archkon wants to merge 1 commit into
Conversation
|
Review requested:
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #64392 +/- ##
==========================================
- Coverage 90.16% 90.13% -0.03%
==========================================
Files 744 744
Lines 242518 242575 +57
Branches 45692 45702 +10
==========================================
- Hits 218663 218642 -21
- Misses 15349 15445 +96
+ Partials 8506 8488 -18
🚀 New features to boost your workflow:
|
Ethan-Arrowood
left a comment
There was a problem hiding this comment.
http.md:3052 says the signal "is aborted when the underlying socket closes or the request is destroyed." After this PR, neither is unconditionally true: normal completion detaches the socket listener, and destroy-after-completion no longer aborts. The PR touches no docs. It needs the prose rewritten (something like "aborted when the client disconnects before the message completes") plus a changes:/REPLACEME YAML entry.
|
@Ethan-Arrowood Could you review the code again when available? Thanks ! |
|
@Ethan-Arrowood sorry to ping you again but I'm working on multiple pr now so would you review this code and see whether merge this ? Or to tell me something to change or modify ?Thanks! |
|
@Ethan-Arrowood Sorry to keep ping and may I ask you to review this again ? As the what the issue said #64390
|
Ethan-Arrowood
left a comment
There was a problem hiding this comment.
Sorry for the delay! GH notifications are a mess these days. This is great work.
|
@Ethan-Arrowood Could you take a look at these failed tests ? |
|
All flake; I have it retrying now. I'll watch this today and see if we can get it to land for you. |
|
@Ethan-Arrowood Sorry, May I ask whether you was occupied with something :-) ? |
|
Simply wasn't at my computer any longer. Will you rebase on |
IncomingMessage 'close' is emitted when request handling completes, not only when the underlying connection is closed. Using that event to abort IncomingMessage.signal makes the signal abort after a request body is read normally. Track the underlying socket close instead, and detach the listener when the request or response completes normally. This keeps the signal from being aborted by normal stream completion or later keep-alive socket closure, while still aborting it when the connection closes during the active request lifecycle. Signed-off-by: Archkon <180910180+Archkon@users.noreply.github.com>
|
@Ethan-Arrowood Could you just rerun the failed github action check? I believe this happened due to flaky test |
|
Yes, I just retried it now. Sorry this is taking some time. CI seemed to have some issues yesterday. I'm also trying to land a PR of my own and its annoyingly taking some time. |
|
If this retry fails I'll do a rebuild instead. Good news, CI seems happier today. I was able to merge my own PR moments ago. Will continue monitoring yours and get it landed 😄 |
Fixes: #64390