Skip to content

fix(h1): backport ignore type of service errors to v7.x (#5547) - #6076

Merged
mcollina merged 1 commit into
v7.xfrom
backport-5547-to-v7.x
Oct 27, 2026
Merged

mcollina merged 1 commit into
v7.xfrom
backport-5547-to-v7.x

Conversation

@mcollina

Copy link
Copy Markdown
Member

Backports #5547 ("fix(h1): ignore type of service errors") to the v7.x branch.

socket.setTypeOfService() is best-effort QoS marking and can throw synchronously on some platforms (e.g. EINVAL on macOS when a connection is reset before the first write), which previously crashed the process via an uncaught exception. This backport skips the call when no typeOfService was requested, tracks the last applied value to avoid redundant calls, and ignores synchronous failures so they do not abort requests.

Closes #6075.

@codecov-commenter

codecov-commenter commented Oct 23, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 86.20690% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 93.15%. Comparing base (0eec414) to head (2bdc6c1).

Files with missing lines Patch % Lines
lib/dispatcher/client-h1.js 85.71% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             v7.x    #6076      +/-   ##
==========================================
- Coverage   93.16%   93.15%   -0.01%     
==========================================
  Files         112      112              
  Lines       37632    37657      +25     
==========================================
+ Hits        35059    35080      +21     
- Misses       2573     2577       +4     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 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.

@mcollina
mcollina requested review from metcoder95 and ronag October 23, 2026 16:22
Backport of #5547 (fix(h1): ignore type of service errors) to v7.x.

- Skip setTypeOfService(0) for fresh HTTP/1.1 sockets when typeOfService was not explicitly provided.
- Track the last ToS value applied to each socket and avoid redundant calls.
- Reset a reused socket back to ToS 0 after an explicitly prioritized request.
- Ignore synchronous setTypeOfService() failures so they do not abort requests or crash the process.

Closes #6075.
@mcollina
mcollina force-pushed the backport-5547-to-v7.x branch from da1df6d to 2bdc6c1 Compare October 24, 2026 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants