Suppress exceptions in RealPingWorkerService

Wrap startRealPing(guid) in a catch(Throwable) that ignores errors so exceptions during measurement won't propagate. This ensures the finally block always runs to decrement totalCount and runningCount, preventing the worker from being interrupted by unexpected errors.
This commit is contained in:
2dust
2026-05-01 17:06:34 +08:00
parent cf33391785
commit 2aefbd43eb
@@ -41,6 +41,8 @@ class RealPingWorkerService(
try {
val result = startRealPing(guid)
MessageUtil.sendMsg2UI(context, AppConfig.MSG_MEASURE_CONFIG_SUCCESS, Pair(guid, result))
} catch (_: Throwable) {
// ignore
} finally {
val count = totalCount.decrementAndGet()
val left = runningCount.decrementAndGet()