Skip to content

quic: cleanly tear down QUIC after worker.terminate() - #66093

Open
pimterry wants to merge 1 commit into
nodejs:mainfrom
pimterry:quic-worker-terminate
Open

pimterry wants to merge 1 commit into
nodejs:mainfrom
pimterry:quic-worker-terminate

Conversation

@pimterry

Copy link
Copy Markdown
Member

I was splitting out threads to do separate server & client benchmarking. It turns out if you run QUIC in a worker thread and then terminate the worker (as in the test here) it hits an assert in QUIC that takes down the whole process.

This happens because the current code assumes that tidy JS closure will run first and trigger Session::Destroy() before ~Session which otherwise blows up. Terminating the worker skips this entirely. This PR is a small fix that sets up proper cleanup, so worker termination shuts down happily.

Signed-off-by: Tim Perry <pimterry@gmail.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 17, 2026
@codecov

codecov Bot commented Sep 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.27%. Comparing base (fa95cd5) to head (e3bb358).
⚠️ Report is 7 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #66093   +/-   ##
=======================================
  Coverage   90.27%   90.27%           
=======================================
  Files         789      789           
  Lines      271623   271625    +2     
  Branches    51847    51853    +6     
=======================================
+ Hits       245196   245211   +15     
+ Misses      16910    16877   -33     
- Partials     9517     9537   +20     

see 35 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.

3 participants