Repository navigation
Conversation
Collaborator
|
Review requested:
|
Contributor
|
Welcome to Node.js, and thank you for your first contribution! Before review, please take a moment to read:
Please make sure every commit is signed off. For a first pull request, GitHub Actions require collaborator approval and Jenkins CI must be started by a collaborator or triager, so an initial wait is normal. |
Keep the native close pending when an active socket write prevents the terminal GOAWAY from being serialized. Finish the close after the outgoing buffers become available, preserving the requested error code. Handle synchronous completion and transport errors without retrying writes to a failed transport or losing the socket close notification. Add a deterministic regression for default and custom GOAWAY codes, both inside and outside the receive callback. Fixes: nodejs#66832 Assisted-by: Codex Signed-off-by: Emerson Gomes <emerson.gomes@gmail.com>
emerzon
force-pushed
the
fix/http2-destroy-goaway
branch
from
October 18, 2026 15:50
7e40c3e to
db1b93a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Keep the native session close pending when an active socket write prevents the terminal GOAWAY from being serialized. Resume shutdown after the write completes, preserving the requested HTTP/2 error code. On write failure, finish shutdown without retrying protocol writes and retain the listener needed to observe socket closure.
Add a deterministic regression using a controlled Duplex transport. It covers destruction inside and outside the receive callback with default and custom GOAWAY codes.
Validation: 296 HTTP/2 tests pass. The new regression and the existing TLS session reuse test each pass 50 repeated runs. The issue's original reproducer changes from sawGoaway=false to sawGoaway=true while the earlier write is still active. JavaScript and C++ lint and import checks pass.
Two local connection tests (test-http2-client-port-80 and test-http2-connect) also hang on unmodified HEAD; they were excluded from the successful 296-test run. Full Node.js CI remains pending.
Fixes: #66832
AI assistance: Codex assisted with implementation, testing, and this draft.