msquic icon indicating copy to clipboard operation
msquic copied to clipboard

Fix Rust connection callback context cleanup and add regression test

Open LindonAliu opened this issue 1 month ago • 2 comments

Description

Closes: #5520

  • Clean up connection callback contexts on ShutdownComplete so handlers set via ConnectionRef are freed automatically (no leak).
  • Allow connection callbacks to return success when the context was already cleared (e.g., post-cleanup), avoiding panics.
  • Add a regression test that asserts the server-side ConnectionRef handler is dropped after shutdown. Testing

Testing

  • cargo test

Documentation

Is there any documentation impact for this change?

LindonAliu avatar Nov 21 '25 23:11 LindonAliu

@microsoft-github-policy-service agree

LindonAliu avatar Nov 21 '25 23:11 LindonAliu

Codecov Report

:white_check_mark: All modified and coverable lines are covered by tests. :warning: Please upload report for BASE (main@b69aa08). Learn more about missing BASE report. :warning: Report is 19 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5618   +/-   ##
=======================================
  Coverage        ?   85.05%           
=======================================
  Files           ?       60           
  Lines           ?    18663           
  Branches        ?        0           
=======================================
  Hits            ?    15873           
  Misses          ?     2790           
  Partials        ?        0           

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov[bot] avatar Nov 22 '25 02:11 codecov[bot]

Hi @guhetier! Thanks a lot for the review and approval. Since I don’t have merge permissions, could you please merge this PR when you get a chance? Thank you!

LindonAliu avatar Dec 13 '25 15:12 LindonAliu

I'll merge as soon as the CI completes (a few unrelated failures). Thanks @LindonAliu for the contribution!

guhetier avatar Dec 15 '25 17:12 guhetier