]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Set timeout on TCP connect attempt
authorOtto <otto.moerbeek@open-xchange.com>
Tue, 30 Nov 2021 06:55:10 +0000 (07:55 +0100)
committerOtto <otto.moerbeek@open-xchange.com>
Tue, 30 Nov 2021 09:56:41 +0000 (10:56 +0100)
regression-tests.recursor-dnssec/recursortests.py

index 0c99bc309a6b5499a43dd97ce8b6d9f075e5f433..4b11850691d643a55f496ae15addf7f4c965f3d9 100644 (file)
@@ -526,6 +526,7 @@ distributor-threads={threads}""".format(confdir=confdir,
         for try_number in range(0, 100):
             try:
                 sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
+                sock.settimeout(1.0)
                 sock.connect((ipaddress, port))
                 sock.close()
                 return