mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Set TCP timeout to a more reasonable value
This commit is contained in:
parent
959b02f58f
commit
6fe8debeba
@ -90,6 +90,7 @@ class Helpers:
|
||||
try:
|
||||
host_public = get('https://api.ipify.org').text
|
||||
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
sock.settimeout(10.0)
|
||||
result = sock.connect_ex((host_public ,server_port))
|
||||
sock.close()
|
||||
if result == 0:
|
||||
|
Loading…
Reference in New Issue
Block a user