mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Wrap sock.recv in try/execpt to stop failure
This commit is contained in:
parent
cb1490724c
commit
0bc7e584e0
@ -121,7 +121,10 @@ def ping(ip, port):
|
||||
i = 0
|
||||
j = 0
|
||||
while True:
|
||||
k = sock.recv(1)
|
||||
try:
|
||||
k = sock.recv(1)
|
||||
except:
|
||||
return 0
|
||||
if not k:
|
||||
return 0
|
||||
k = k[0]
|
||||
|
Loading…
Reference in New Issue
Block a user