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. |
Signed-off-by: Adewole oluwanifemi <beniphemeh11@yahoo.com>
9ae8083 to
96dfa8c
Compare
|
Thanks, @inoway46, for the confirmation and for encouraging me to proceed. I've implemented the fix and opened a PR for review. The issue was caused by the early-return path in I've also added regression tests covering TCP and pipe-backed The Node.js release build completed successfully, and both relevant test suites passed:
Thanks again for the guidance. I'd appreciate your review. |
Summary
Fixes an issue where the
signaloption is silently ignored when anet.Serverstarts listening with aBoundSocket.Server.prototype.listen()handlesBoundSocketinstances through an early-return path. This path bypasses the normaladdServerAbortSignalOption()registration, meaning the suppliedAbortSignalis never connected to the server lifecycle. Consequently, aborting the signal does not close the server, potentially leaving the process running with an active listening handle.This change registers the abort-signal handling within the
BoundSocketbranch, before the socket handle is consumed. This preserves the existing ownership-transfer semantics while ensuring that signal validation and abort-listener registration happen before the server adopts the handle.Implementation
BoundSockethandling path before callingkBoundSocketConsume().server.listen()paths.BoundSocketis consumed.Tests
Add regression coverage for:
BoundSocketinstances aborted from thelisteningcallback.listen().BoundSocketremains unconsumed.BoundSocketinstances.Validation
python3 tools/test.py --mode=release parallel/test-net-boundsocket.js— passed.python3 tools/test.py --mode=release parallel/test-net-server-listen-options-signal.js— passed.git diff --check— passed.Fixes: #67855