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

@ -293,6 +293,11 @@ class Helpers:
try:
requests.get("https://ntp.org", timeout=1)
return True
except Exception:
try:
logger.error("ntp.org ping failed. Falling back to google")
requests.get("https://google.com", timeout=1)
return True
except Exception:
return False