Skip to content

net: ignore UV_EALREADY in tryReadStart#64530

Open
harjothkhara wants to merge 1 commit into
nodejs:mainfrom
harjothkhara:codex/fix-net-readstart-ealready
Open

net: ignore UV_EALREADY in tryReadStart#64530
harjothkhara wants to merge 1 commit into
nodejs:mainfrom
harjothkhara:codex/fix-net-readstart-ealready

Conversation

@harjothkhara

Copy link
Copy Markdown
Contributor

tryReadStart() treated every non-zero readStart() result as fatal. That
included UV_EALREADY, which means the handle is already reading and no
additional action is required.

Ignore UV_EALREADY while preserving the existing socket destruction path for
all other read-start errors. Add a loopback regression test that forces this
return value and verifies that the socket remains usable.

Fixes: #62400

Tests:

  • make -j8
  • tools/test.py test/parallel/test-net-read-start-ealready.js
  • tools/test.py test/parallel/test-net-*.js
  • make lint-js

AI assistance: OpenAI Codex assisted with implementation and validation. Local
Claude and Codex review passes reported no actionable findings.

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/net

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. net Issues and PRs related to the net subsystem. labels Jul 16, 2026
@harjothkhara harjothkhara marked this pull request as ready for review July 16, 2026 06:00
@codecov

codecov Bot commented Jul 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.23%. Comparing base (608112a) to head (51e7fce).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #64530      +/-   ##
==========================================
+ Coverage   90.21%   90.23%   +0.01%     
==========================================
  Files         739      739              
  Lines      241650   241651       +1     
  Branches    45542    45553      +11     
==========================================
+ Hits       218013   218054      +41     
+ Misses      15155    15110      -45     
- Partials     8482     8487       +5     
Files with missing lines Coverage Δ
lib/net.js 94.37% <100.00%> (+<0.01%) ⬆️

... and 24 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ci PRs that need a full CI run. net Issues and PRs related to the net subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

net: tryReadStart destroys socket on UV_EALREADY instead of ignoring it

2 participants