From: Nicki Křížek Date: Thu, 11 Jun 2026 12:04:37 +0000 (+0000) Subject: fixup! Port TCP high-water checks to Python X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fb1d059b52459f14e7ffa91e51a649fa2064d606;p=thirdparty%2Fbind9.git fixup! Port TCP high-water checks to Python Assisted-by: Claude:claude-fable-5 --- diff --git a/bin/tests/system/tcp/tests_tcp.py b/bin/tests/system/tcp/tests_tcp.py index 8472ece8fc0..b1d59fd82c1 100644 --- a/bin/tests/system/tcp/tests_tcp.py +++ b/bin/tests/system/tcp/tests_tcp.py @@ -199,7 +199,9 @@ async def open_tcp_query_connection(host: str, port: int) -> socket.socket: "version.bind.", "TXT", "CH", dnssec=False, use_edns=False, ad=False ) await loop.sock_sendall(sock, msg.to_wire(prepend_length=True)) - except OSError: + except BaseException: + # BaseException so the socket is also closed when the task is + # cancelled at one of the awaits, not just on connection errors sock.close() raise