mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2025-07-25 02:55:58 +00:00
Wrap sock.recv in try/execpt to stop failure
This commit is contained in:
@ -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]
|
||||
|
Reference in New Issue
Block a user