From e185b361389e059fa0f9372a218a93c5d4486332 Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Fri, 5 Jun 2026 12:47:46 -0400 Subject: [PATCH] fix(android): arbitrate op-failure probe off the reducer thread Awaiting probeOnce() inline in the OpFailure branch blocked the single-consumer reducer for the /healthz timeout, delaying a concurrent self-proving success from snapping back to Healthy. Launch the probe instead so recovery stays fast. Co-Authored-By: Claude Opus 4.8 (1M context) --- .../minstrel/connectivity/NetworkStatusController.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/android/app/src/main/java/com/fabledsword/minstrel/connectivity/NetworkStatusController.kt b/android/app/src/main/java/com/fabledsword/minstrel/connectivity/NetworkStatusController.kt index 54eed5c4..e59d8b1a 100644 --- a/android/app/src/main/java/com/fabledsword/minstrel/connectivity/NetworkStatusController.kt +++ b/android/app/src/main/java/com/fabledsword/minstrel/connectivity/NetworkStatusController.kt @@ -109,7 +109,10 @@ class NetworkStatusController @Inject constructor( Intent.OpSuccess -> machine.onSuccess() Intent.OpFailure -> { machine.onOpFailure(now) - probeOnce() // arbitrate: let /healthz decide if this is real + // Arbitrate off the reducer thread: awaiting a stalled + // /healthz here would block a concurrent self-proving + // success from snapping us straight back to Healthy. + scope.launch { probeOnce() } } } emit(machine.health())