From c4e0a6ee4849ff5a7c28f7b0f8053de09c61c8a0 Mon Sep 17 00:00:00 2001 From: Enginex0 Date: Tue, 19 May 2026 05:03:19 +0100 Subject: [PATCH] fix(spoof): wrap pollOnce in umbrella try/catch fetchAndParse and appendHistory each catch their own exceptions, but scheduleNext can throw IllegalStateException if the Looper is torn down or any helper raises an unanticipated error. Without an outer catch, the reschedule chain broke and the poller stayed dead until reboot. Wrap the entire body so a thrown exception still attempts to schedule the next poll. --- .../org/matrix/TEESimulator/config/BulletinPoller.kt | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/org/matrix/TEESimulator/config/BulletinPoller.kt b/app/src/main/java/org/matrix/TEESimulator/config/BulletinPoller.kt index 49888ec..70eeeb2 100644 --- a/app/src/main/java/org/matrix/TEESimulator/config/BulletinPoller.kt +++ b/app/src/main/java/org/matrix/TEESimulator/config/BulletinPoller.kt @@ -36,9 +36,14 @@ object BulletinPoller { } private fun pollOnce() { - val result = fetchAndParse() - appendHistory(result) - scheduleNext(result.status == "success") + try { + val result = fetchAndParse() + appendHistory(result) + scheduleNext(result.status == "success") + } catch (t: Throwable) { + SystemLogger.error("BulletinPoller: pollOnce failed", t) + scheduleNext(false) + } } private fun scheduleNext(success: Boolean) {