From a36a50ba0dada470b9ceeaf05c07340049a48bda Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Fri, 28 Aug 2015 16:23:23 +0800 Subject: [PATCH] comm_tcp: add connect timeout --- artiq/coredevice/comm_tcp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/artiq/coredevice/comm_tcp.py b/artiq/coredevice/comm_tcp.py index f61212128..41426d1e3 100644 --- a/artiq/coredevice/comm_tcp.py +++ b/artiq/coredevice/comm_tcp.py @@ -32,7 +32,7 @@ class Comm(CommGeneric): def open(self): if hasattr(self, "socket"): return - self.socket = socket.create_connection((self.host, self.port)) + self.socket = socket.create_connection((self.host, self.port), 5.0) 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")