Repository navigation
Conversation
|
Review requested:
|
|
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>
7e40c3e to
db1b93a
Compare
|
LGTM based on local testing. I applied this patch on top of main (5b5f384) and built it on macOS x64. All 295 HTTP/2 parallel tests passed. This also fixes the file-serving case I reported: GOAWAY is now received in 3/3 runs each with One non-blocking suggestion: could the regression test also cover the held write completing with an error? I tested this locally and shutdown completed without further writes, but adding coverage would help protect the new error-handling path. |
|
@nodejs/http2 @nodejs/net Could someone review and run CI for this PR? |
|
Linter CI is red |
Align continuation parameters with clang-format to fix the format-cpp CI failure. Refs: nodejs#66834 Assisted-by: Codex Signed-off-by: Emerson Gomes <emerson.gomes@gmail.com>
|
Fixed in emerzon@63a17e0. The failure was parameter alignment in |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #66834 +/- ##
==========================================
- Coverage 92.85% 90.70% -2.15%
==========================================
Files 428 797 +369
Lines 194833 278891 +84058
Branches 30108 53629 +23521
==========================================
+ Hits 180907 252977 +72070
- Misses 13599 16269 +2670
- Partials 327 9645 +9318
🚀 New features to boost your workflow:
|
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.