Skip to content

Make serve() an async context manager#515

Open
jlaine wants to merge 1 commit intoaiortc:mainfrom
jlaine:http3-server-close
Open

Make serve() an async context manager#515
jlaine wants to merge 1 commit intoaiortc:mainfrom
jlaine:http3-server-close

Conversation

@jlaine
Copy link
Contributor

@jlaine jlaine commented Jun 22, 2024

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

@codecov
Copy link

codecov bot commented Jun 22, 2024

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (352bcf8) to head (e370663).
⚠️ 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     

☔ View full report in Codecov by Sentry.
📢 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.

@jlaine
Copy link
Contributor Author

jlaine commented Jun 22, 2024

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

@rthalley
Copy link
Contributor

I think clean closing is worth the breaking change.

@jlaine jlaine force-pushed the http3-server-close branch from df0a699 to 919b542 Compare February 2, 2025 15:07
@jlaine jlaine marked this pull request as ready for review February 2, 2025 15:08
@jlaine
Copy link
Contributor Author

jlaine commented Feb 2, 2025

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

@HarshArora-1205
Copy link

Status?

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.
@jlaine jlaine force-pushed the http3-server-close branch from 919b542 to e370663 Compare October 7, 2025 13:01
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

Comments