remote connection timeout (#15370)

This commit is contained in:
nimlgen
2026-03-19 19:44:16 +08:00
committed by GitHub
parent 68d7a6b7be
commit 16daffc042

View File

@@ -314,7 +314,9 @@ class RemotePCIDevice(PCIDevice):
host, port = host_port[0], int(host_port[1]) if len(host_port) > 1 else 6667
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)
sock.settimeout(getenv("REMOTE_TIMEOUT", 3))
sock.connect((host, port))
sock.settimeout(None)
return sock
@staticmethod