|
|
@ -725,7 +725,6 @@ def main(): |
|
|
|
enable_multithread=True, |
|
|
|
enable_multithread=True, |
|
|
|
timeout=30.0) |
|
|
|
timeout=30.0) |
|
|
|
cloudlog.event("athenad.main.connected_ws", ws_uri=ws_uri) |
|
|
|
cloudlog.event("athenad.main.connected_ws", ws_uri=ws_uri) |
|
|
|
params.delete("PrimeRedirected") |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
conn_retries = 0 |
|
|
|
conn_retries = 0 |
|
|
|
cur_upload_items.clear() |
|
|
|
cur_upload_items.clear() |
|
|
@ -735,22 +734,13 @@ def main(): |
|
|
|
break |
|
|
|
break |
|
|
|
except (ConnectionError, TimeoutError, WebSocketException): |
|
|
|
except (ConnectionError, TimeoutError, WebSocketException): |
|
|
|
conn_retries += 1 |
|
|
|
conn_retries += 1 |
|
|
|
params.delete("PrimeRedirected") |
|
|
|
|
|
|
|
params.delete("LastAthenaPingTime") |
|
|
|
params.delete("LastAthenaPingTime") |
|
|
|
except socket.timeout: |
|
|
|
except socket.timeout: |
|
|
|
try: |
|
|
|
|
|
|
|
r = requests.get("http://api.commadotai.com/v1/me", allow_redirects=False, |
|
|
|
|
|
|
|
headers={"User-Agent": f"openpilot-{get_version()}"}, timeout=15.0) |
|
|
|
|
|
|
|
if r.status_code == 302 and r.headers['Location'].startswith("http://u.web2go.com"): |
|
|
|
|
|
|
|
params.put_bool("PrimeRedirected", True) |
|
|
|
|
|
|
|
except Exception: |
|
|
|
|
|
|
|
cloudlog.exception("athenad.socket_timeout.exception") |
|
|
|
|
|
|
|
params.delete("LastAthenaPingTime") |
|
|
|
params.delete("LastAthenaPingTime") |
|
|
|
except Exception: |
|
|
|
except Exception: |
|
|
|
cloudlog.exception("athenad.main.exception") |
|
|
|
cloudlog.exception("athenad.main.exception") |
|
|
|
|
|
|
|
|
|
|
|
conn_retries += 1 |
|
|
|
conn_retries += 1 |
|
|
|
params.delete("PrimeRedirected") |
|
|
|
|
|
|
|
params.delete("LastAthenaPingTime") |
|
|
|
params.delete("LastAthenaPingTime") |
|
|
|
|
|
|
|
|
|
|
|
time.sleep(backoff(conn_retries)) |
|
|
|
time.sleep(backoff(conn_retries)) |
|
|
|