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.
This commit is contained in:
Enginex0
2026-05-19 05:03:19 +01:00
parent a79d7e3637
commit c4e0a6ee48
@@ -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) {