← back to Exo
Try multiple endpoints for internet connectivity check (#1516)
7cadca4f277aaab731bbe0b7729d7e76ae0abfcb · 2026-02-18 14:10:07 -0800 · Alex Cheema
## Summary
- `_test_internet_connection()` previously only tried `1.1.1.1:443`,
which some ISPs/networks block, causing exo to incorrectly report no
internet and fail downloads on startup
- Now tries `1.1.1.1`, `8.8.8.8`, and `1.0.0.1` in sequence, succeeding
if any endpoint responds
- Returns early on first success for minimal latency in the common case
Fixes #1425
## Test plan
- [ ] Verify downloads work on networks that block `1.1.1.1`
- [ ] Verify existing behavior unchanged on networks where `1.1.1.1`
works
- [ ] Verify `internet_connection` is set to `False` only when all three
endpoints fail
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: rltakashige <rl.takashige@gmail.com>
Files touched
M src/exo/download/coordinator.py
Diff
commit 7cadca4f277aaab731bbe0b7729d7e76ae0abfcb
Author: Alex Cheema <41707476+AlexCheema@users.noreply.github.com>
Date: Wed Feb 18 14:10:07 2026 -0800
Try multiple endpoints for internet connectivity check (#1516)
## Summary
- `_test_internet_connection()` previously only tried `1.1.1.1:443`,
which some ISPs/networks block, causing exo to incorrectly report no
internet and fail downloads on startup
- Now tries `1.1.1.1`, `8.8.8.8`, and `1.0.0.1` in sequence, succeeding
if any endpoint responds
- Returns early on first success for minimal latency in the common case
Fixes #1425
## Test plan
- [ ] Verify downloads work on networks that block `1.1.1.1`
- [ ] Verify existing behavior unchanged on networks where `1.1.1.1`
works
- [ ] Verify `internet_connection` is set to `False` only when all three
endpoints fail
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: rltakashige <rl.takashige@gmail.com>
---
src/exo/download/coordinator.py | 19 +++++++++++--------
1 file changed, 11 insertions(+), 8 deletions(-)
diff --git a/src/exo/download/coordinator.py b/src/exo/download/coordinator.py
index 899e4f14..30e45a08 100644
--- a/src/exo/download/coordinator.py
+++ b/src/exo/download/coordinator.py
@@ -123,14 +123,17 @@ class DownloadCoordinator:
tg.start_soon(self._check_internet_connection)
def _test_internet_connection(self) -> None:
- try:
- socket.create_connection(("1.1.1.1", 443), timeout=3).close()
- self.shard_downloader.set_internet_connection(True)
- except OSError:
- self.shard_downloader.set_internet_connection(False)
- logger.debug(
- f"Internet connectivity: {self.shard_downloader.internet_connection}"
- )
+ # Try multiple endpoints since some ISPs/networks block specific IPs
+ for host in ("1.1.1.1", "8.8.8.8", "1.0.0.1"):
+ try:
+ socket.create_connection((host, 443), timeout=3).close()
+ self.shard_downloader.set_internet_connection(True)
+ logger.debug(f"Internet connectivity: True (via {host})")
+ return
+ except OSError:
+ continue
+ self.shard_downloader.set_internet_connection(False)
+ logger.debug("Internet connectivity: False")
async def _check_internet_connection(self) -> None:
first_connection = True
← 24e99ce1 Cleanup mistakes (#1537)
·
back to Exo
·
Add status=downloaded filter for model endpoint (#1539) 19bc0955 →