Skip to content

Commit

Permalink
When closing an asyncio server, stop the handlers
Browse files Browse the repository at this point in the history
  • Loading branch information
gvanrossum committed Sep 27, 2024
1 parent 986a4e1 commit 6f95230
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Lib/asyncio/base_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,7 @@ async def serve_forever(self):
except exceptions.CancelledError:
try:
self.close()
self.close_clients()
await self.wait_closed()
finally:
raise
Expand Down

0 comments on commit 6f95230

Please sign in to comment.