mirror of https://github.com/m-labs/artiq.git
coredevice/comm_tcp: disable socket timeout after connect
Reads may block indefinitely.
This commit is contained in:
parent
8253739992
commit
6e5b71a43e
|
@ -33,6 +33,7 @@ class Comm(CommGeneric):
|
||||||
if hasattr(self, "socket"):
|
if hasattr(self, "socket"):
|
||||||
return
|
return
|
||||||
self.socket = socket.create_connection((self.host, self.port), 5.0)
|
self.socket = socket.create_connection((self.host, self.port), 5.0)
|
||||||
|
self.socket.settimeout(None)
|
||||||
set_keepalive(self.socket, 3, 2, 3)
|
set_keepalive(self.socket, 3, 2, 3)
|
||||||
logger.debug("connected to host %s on port %d", self.host, self.port)
|
logger.debug("connected to host %s on port %d", self.host, self.port)
|
||||||
self.write(b"ARTIQ coredev\n")
|
self.write(b"ARTIQ coredev\n")
|
||||||
|
|
Loading…
Reference in New Issue