From: Bob Halley Date: Fri, 27 Oct 2023 02:23:27 +0000 (-0700) Subject: The asyncio quic code did not close politely in clean exit cases. X-Git-Tag: v2.5.0rc1~37 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cb83902c21f6a938b53c403d7445a2b0a473c0e7;p=thirdparty%2Fdnspython.git The asyncio quic code did not close politely in clean exit cases. --- diff --git a/dns/quic/_asyncio.py b/dns/quic/_asyncio.py index 57c9910b..b2597371 100644 --- a/dns/quic/_asyncio.py +++ b/dns/quic/_asyncio.py @@ -189,7 +189,6 @@ class AsyncioQuicConnection(AsyncQuicConnection): self._connection.close() # sender might be blocked on this, so set it self._socket_created.set() - await self._socket.close() async with self._wake_timer: self._wake_timer.notify_all() try: @@ -200,6 +199,7 @@ class AsyncioQuicConnection(AsyncQuicConnection): await self._sender_task except asyncio.CancelledError: pass + await self._socket.close() class AsyncioQuicManager(AsyncQuicManager):