]> git.ipfire.org Git - thirdparty/dnspython.git/commitdiff
Close QUIC sync and trio sockets when done.
authorBob Halley <halley@dnspython.org>
Thu, 7 Mar 2024 13:15:34 +0000 (05:15 -0800)
committerBob Halley <halley@dnspython.org>
Thu, 7 Mar 2024 13:15:34 +0000 (05:15 -0800)
dns/quic/_sync.py
dns/quic/_trio.py

index 78f6c5e2db63ac662495950d22448c988a998e18..473d1f4811e4a11dc67ac88acec282bb68ddb805 100644 (file)
@@ -153,6 +153,7 @@ class SyncQuicConnection(BaseQuicConnection):
         finally:
             with self._lock:
                 self._done = True
+            self._socket.close()
             # Ensure anyone waiting for this gets woken up.
             self._handshake_complete.set()
 
index bf2845579a9747d97e6fe5fdd2cd83d7a20df885..ae79f36957c20aed90f785720d9a767c85a9825c 100644 (file)
@@ -126,6 +126,7 @@ class TrioQuicConnection(AsyncQuicConnection):
                     await self._socket.send(datagram)
         finally:
             self._done = True
+            self._socket.close()
             self._handshake_complete.set()
 
     async def _handle_events(self):