From 6e5b71a43e84c881bde47f6830e4a29b969cfde7 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Thu, 3 Sep 2015 09:59:24 -0600 Subject: [PATCH] coredevice/comm_tcp: disable socket timeout after connect Reads may block indefinitely. --- artiq/coredevice/comm_tcp.py | 1 + 1 file changed, 1 insertion(+) diff --git a/artiq/coredevice/comm_tcp.py b/artiq/coredevice/comm_tcp.py index 41426d1e3..8c3334c8f 100644 --- a/artiq/coredevice/comm_tcp.py +++ b/artiq/coredevice/comm_tcp.py @@ -33,6 +33,7 @@ class Comm(CommGeneric): if hasattr(self, "socket"): return self.socket = socket.create_connection((self.host, self.port), 5.0) + self.socket.settimeout(None) set_keepalive(self.socket, 3, 2, 3) logger.debug("connected to host %s on port %d", self.host, self.port) self.write(b"ARTIQ coredev\n")