Skip to content

Commit ca71689

Browse files
committed
fix: connection timeout
1 parent ec3e02d commit ca71689

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

d4_pyclient/d4_client.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,11 @@ def connect(self):
192192
continue
193193
else:
194194
sys.exit(1)
195+
except socket.timeout:
196+
logger.error('Connection to {}:{} timeout'.format(host, self.port))
197+
if self.reconnect:
198+
time.sleep(10)
199+
continue
195200
except ssl.SSLError as e:
196201
logger.error(e)
197202
sys.exit(1)

0 commit comments

Comments
 (0)