coredevice/comm_tcp: disable socket timeout after connect

Reads may block indefinitely.
This commit is contained in:
Sebastien Bourdeauducq 2015-09-03 09:59:24 -06:00
parent 8253739992
commit 6e5b71a43e

View File

@ -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")