Skip to content

fix(cty): retry cty.dat fetch with exponential backoff#1132

Open
9M2PJU wants to merge 1 commit into
accius:mainfrom
9M2PJU:fix/cty-dat-retry-backoff
Open

fix(cty): retry cty.dat fetch with exponential backoff#1132
9M2PJU wants to merge 1 commit into
accius:mainfrom
9M2PJU:fix/cty-dat-retry-backoff

Conversation

@9M2PJU

@9M2PJU 9M2PJU commented Jul 10, 2026

Copy link
Copy Markdown

A transient failure (timeout, slow DNS, container boot race) on the single startup fetch left the app stranded on the built-in 120-entry fallback prefix table for 24 hours until the next scheduled refresh.

Add fetchWithRetry() with 3 attempts and 5s/10s/20s backoff, wired into both initCtyData() and the 24h periodic refresh interval. The fetch function is injectable for testing.

Adds ctydat.test.js covering: first-try success, fail-then-succeed, all-attempts-fail, and parse round-trip.

A transient failure (timeout, slow DNS, container boot race) on the
single startup fetch left the app stranded on the built-in 120-entry
fallback prefix table for 24 hours until the next scheduled refresh.

Add fetchWithRetry() with 3 attempts and 5s/10s/20s backoff, wired
into both initCtyData() and the 24h periodic refresh interval. The
fetch function is injectable for testing.

Adds ctydat.test.js covering: first-try success, fail-then-succeed,
all-attempts-fail, and parse round-trip.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant