SPL Meter 0.4.3: a failed capture-tool build must not park the listener forever
Same deadlock the Timers module hit live on AB (fixed there in 1.5.1): start() skipped scheduling its retry while a build was in flight, and ensureCaptureBinary's onReady only fires on build SUCCESS. A failed build therefore left the listener waiting forever on a callback that never comes — "Building the capture tool…" indefinitely — and a binary scp'd in from outside (the required path on AB, whose CLT cannot compile) was never picked up without a module remount. onReady stays as the fast path; the 30-second retry is now armed in every not-ready state, so a failed build keeps re-checking and an externally supplied binary is found within half a minute. Reproduced pre-fix (build fails at 0s, binary copied in at 3s, still untouched at 38s) and verified post-fix (retry at 30s spawns it). spl-capture --selftest unchanged against the IEC 61672 table. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
9313c9e42a
commit
e9d6edc2c8
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"id": "spl-meter",
|
||||
"name": "SPL Meter",
|
||||
"version": "0.4.2",
|
||||
"version": "0.4.3",
|
||||
"proddash": ">=1.5.0",
|
||||
"description": "Calibrated sound level, Leq and RTA from an audio input on this machine",
|
||||
"permissions": [
|
||||
|
||||
@@ -153,9 +153,13 @@ function createSplListener(opts) {
|
||||
const missing = ensureBinary();
|
||||
if (missing) {
|
||||
onUpdate({ error: missing });
|
||||
// A build in flight calls start() itself when it lands; anything else
|
||||
// is config-shaped and should back off hard rather than spin.
|
||||
if (missing !== BUILDING) scheduleRestart(BAD_CONFIG_RETRY_MS);
|
||||
// onReady is only the FAST path (a successful build restarts us at
|
||||
// once). The slow retry must stay armed regardless: a failed build
|
||||
// never calls back, and a binary can also arrive from outside — scp'd
|
||||
// in on a machine whose toolchain can't build (AB's broken CLT).
|
||||
// Waiting on onReady alone deadlocked exactly that way in the Timers
|
||||
// module: "building…" forever, with a working binary on disk.
|
||||
scheduleRestart(BAD_CONFIG_RETRY_MS);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user