From 3404e005b98207724c3788ef5d8da4fae1849506 Mon Sep 17 00:00:00 2001 From: Alexander Vasin Date: Mon, 14 Apr 2025 11:01:16 +0300 Subject: [PATCH] Do not stop waiting ports on unavailable DNS records --- base/tools/wait-for-port | 3 +++ 1 file changed, 3 insertions(+) diff --git a/base/tools/wait-for-port b/base/tools/wait-for-port index a2e7023..0a8dd8e 100644 --- a/base/tools/wait-for-port +++ b/base/tools/wait-for-port @@ -16,6 +16,9 @@ def check_port(host, port): sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) try: return sock.connect_ex((host, port)) == 0 + except OSError as e: + logging.error(f"Can't connect to {host}:{port} — {e}") + return False finally: sock.close()