aioquic icon indicating copy to clipboard operation
aioquic copied to clipboard

Make `serve()` an async context manager

Open jlaine opened this issue 1 year ago • 5 comments

In order to get a clean shutdown of the asyncio-based QUIC server, we need to:

  • Make the QuicServer.close() method async.
  • Make the serve() method an async context manager.

See #513

jlaine avatar Jun 22 '24 12:06 jlaine

Codecov Report

:white_check_mark: All modified and coverable lines are covered by tests. :white_check_mark: Project coverage is 100.00%. Comparing base (352bcf8) to head (e370663). :warning: Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #515   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           25        25           
  Lines         5102      5108    +6     
=========================================
+ Hits          5102      5108    +6     

: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 Jun 22 '24 13:06 codecov[bot]

@rthalley This is a breaking change, so it looks we would need to make the next release 2.0.

jlaine avatar Jun 22 '24 21:06 jlaine

I think clean closing is worth the breaking change.

rthalley avatar Jun 30 '24 21:06 rthalley

@rthalley I think I'm going to merge this, any objection?

jlaine avatar Feb 02 '25 15:02 jlaine

Status?

HarshArora-1205 avatar May 30 '25 06:05 HarshArora-1205