From 40d1204c2a538ca30095b0c9a2b97cefdca34cd2 Mon Sep 17 00:00:00 2001 From: David Shrewsbury Date: Wed, 21 Feb 2018 13:41:28 -0500 Subject: [PATCH] Unset finger client timeout after connect Our finger client will timeout after 10 seconds if no data is received from the executor after we connect. We really only want the timeout on the connection portion and just wait forever until some data starts streaming back. Unset the socket timeout after connecting. Change-Id: I94398f78ac6e36715eed830c70ef2b178b310a34 --- zuul/lib/fingergw.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/zuul/lib/fingergw.py b/zuul/lib/fingergw.py index b56fe04611..e582884ba1 100644 --- a/zuul/lib/fingergw.py +++ b/zuul/lib/fingergw.py @@ -49,6 +49,8 @@ class RequestHandler(streamer_utils.BaseFingerRequestHandler): Both IPv4 and IPv6 are supported. ''' with socket.create_connection((server, port), timeout=10) as s: + # timeout only on the connection, let recv() wait forever + s.settimeout(None) msg = "%s\n" % build_uuid # Must have a trailing newline! s.sendall(msg.encode('utf-8')) while True: