mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Add a fallback for google.com
This commit is contained in:
parent
12fc3be00d
commit
5ff14be92f
@ -294,7 +294,12 @@ class Helpers:
|
||||
requests.get("https://ntp.org", timeout=1)
|
||||
return True
|
||||
except Exception:
|
||||
return False
|
||||
try:
|
||||
logger.error("ntp.org ping failed. Falling back to google")
|
||||
requests.get("https://google.com", timeout=1)
|
||||
return True
|
||||
except Exception:
|
||||
return False
|
||||
|
||||
@staticmethod
|
||||
def check_port(server_port):
|
||||
|
Loading…
Reference in New Issue
Block a user