Skip to content

quic: refresh session path addresses - #65733

Open
manNomi wants to merge 2 commits into
nodejs:mainfrom
manNomi:fix/quic-session-path
Open

quic: refresh session path addresses#65733
manNomi wants to merge 2 commits into
nodejs:mainfrom
manNomi:fix/quic-session-path

Conversation

@manNomi

@manNomi manNomi commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Description

QuicSession#path currently caches the SocketAddress instances created on first access. When a client follows a server's preferred address, ngtcp2 updates the connection path but later session.path reads continue to expose the original addresses.

Read the current path from ngtcp2_conn_get_path2() and refresh private address state whenever session.path is accessed. The public path object remains cached and its local and remote properties are read-only, so freezing the returned object does not prevent later internal refreshes.

Extend the preferred-address migration test to verify the initial and migrated paths, preserve the cached object identity, and cover a frozen path object. Document the cache and refresh behavior.

Signed-off-by: manNomi <hanmw110@naver.com>
Use ngtcp2's current path as the address source and keep mutable address state private so cached path objects remain safe to freeze.

Signed-off-by: manNomi <hanmw110@naver.com>
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/quic

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. quic Issues and PRs related to the QUIC transport implementation. labels Sep 2, 2026
@codecov

codecov Bot commented Sep 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.05%. Comparing base (2247054) to head (6e30e5f).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #65733      +/-   ##
==========================================
- Coverage   90.05%   90.05%   -0.01%     
==========================================
  Files         755      755              
  Lines      257100   257128      +28     
  Branches    48730    48737       +7     
==========================================
+ Hits       231544   231567      +23     
+ Misses      16675    16650      -25     
- Partials     8881     8911      +30     
Files with missing lines Coverage Δ
lib/internal/quic/quic.js 100.00% <100.00%> (ø)

... and 41 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

c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. quic Issues and PRs related to the QUIC transport implementation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants