]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
fixup! Port TCP high-water checks to Python
authorNicki Křížek <nicki@isc.org>
Thu, 11 Jun 2026 12:04:37 +0000 (12:04 +0000)
committerNicki Křížek <nicki@isc.org>
Thu, 11 Jun 2026 12:08:37 +0000 (14:08 +0200)
Assisted-by: Claude:claude-fable-5
bin/tests/system/tcp/tests_tcp.py

index 8472ece8fc075f87c6d2f2079c17df895bbec0a3..b1d59fd82c1a0dc8e2d5b60ce7936cf52c6e4148 100644 (file)
@@ -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