Skip to content

Commit

Permalink
Close QUIC sync and trio sockets when done.
Browse files Browse the repository at this point in the history
  • Loading branch information
rthalley committed Mar 7, 2024
1 parent 40722b9 commit 11b09df
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions dns/quic/_sync.py
Expand Up @@ -153,6 +153,7 @@ def _worker(self):
finally:
with self._lock:
self._done = True
self._socket.close()
# Ensure anyone waiting for this gets woken up.
self._handshake_complete.set()

Expand Down
1 change: 1 addition & 0 deletions dns/quic/_trio.py
Expand Up @@ -126,6 +126,7 @@ async def _worker(self):
await self._socket.send(datagram)
finally:
self._done = True
self._socket.close()
self._handshake_complete.set()

async def _handle_events(self):
Expand Down

0 comments on commit 11b09df

Please sign in to comment.