From b391988a0fbce1ffbeb4fa019101de14ceccb0e8 Mon Sep 17 00:00:00 2001 From: Doxa Maps Date: Fri, 2 Oct 2026 19:07:51 +0000 Subject: [PATCH] Print files: a transient failure to load the places table is retried on the next print loadPlaces memoised an empty table on ANY failure, so one network error meant no city dots for the rest of the session, while the other pinned loaders retry. A table that is not served (or a reader offline) is now forgotten, so a later print tries again; wrong bytes, refused after the fresh refetch, stay refused for the session. --- library/packet/posterSheets.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/library/packet/posterSheets.js b/library/packet/posterSheets.js index ad01a9e42..08fa60f70 100644 --- a/library/packet/posterSheets.js +++ b/library/packet/posterSheets.js @@ -102,12 +102,14 @@ function loadPlaces(assetsBase) { let text try { text = await fetchPinned(url, NE_PLACES_SHA384) } catch (e) { - if (e?.integrity) console.warn(`[posterSheets] ${url} failed its integrity check, also when fetched fresh — drawing no city dots`) + if (!e?.integrity) throw e // not served, or offline: a later print tries again (below) + console.warn(`[posterSheets] ${url} failed its integrity check, also when fetched fresh — drawing no city dots`) return [] } return JSON.parse(text).places || [] - })().catch(() => []) - placesCache.set(url, p) + })() + // Wrong bytes stay refused for the session; a transient failure is forgotten, as in the other loaders. + placesCache.set(url, p.catch(() => { placesCache.delete(url); return [] })) } return placesCache.get(url) }