]> git.ipfire.org Git - thirdparty/dnspython.git/commitdiff
The asyncio quic code did not close politely in clean exit cases.
authorBob Halley <halley@dnspython.org>
Fri, 27 Oct 2023 02:23:27 +0000 (19:23 -0700)
committerBob Halley <halley@dnspython.org>
Fri, 27 Oct 2023 02:23:27 +0000 (19:23 -0700)
dns/quic/_asyncio.py

index 57c9910b03ab59fb4eb55a992613f6ad41b935d7..b2597371849d5fd84ebadc87c1166862e50ea9ee 100644 (file)
@@ -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):