Add a fallback for google.com

This commit is contained in:
amcmanu3 2023-03-08 18:46:06 -05:00
parent 12fc3be00d
commit 5ff14be92f

View File

@ -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):