Revert "Version 2.3.1"

This reverts commit 3d4179ce84.
This commit is contained in:
Jeroen Oudshoorn
2023-09-08 20:26:42 +02:00
parent 6d295c1866
commit ce09a21f02
2 changed files with 65 additions and 69 deletions

View File

@ -13,10 +13,9 @@ API_ADDRESS = "http://127.0.0.1:8666/api/v1"
def is_connected():
try:
# check DNS
host = socket.gethostbyname('api.pwnagotchi.ai')
if host:
# check connectivity itself
socket.create_connection((host, 443), timeout=30)
host = 'https://api.opwngrid.xyz/api/v1/uptime'
r = requests.get(host, headers=None, timeout=(30.0, 60.0))
if r.json().get('isUp'):
return True
except:
pass