From 8921f50845dc24100b2f629a689df9d4059c59e2 Mon Sep 17 00:00:00 2001 From: mueller-ma Date: Sun, 8 Oct 2023 10:28:10 +0200 Subject: [PATCH] Retry work in case of HTTP code 500 I've seen the HTTP code 500 a few times when no connection could be established, so retry in this case. https://community.openhab.org/t/android-app-item-update-error-http-500-in-case-of-no-connection/149488 Signed-off-by: mueller-ma --- .../java/org/openhab/habdroid/background/ItemUpdateWorker.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mobile/src/main/java/org/openhab/habdroid/background/ItemUpdateWorker.kt b/mobile/src/main/java/org/openhab/habdroid/background/ItemUpdateWorker.kt index 07fe190b3d..bd1e6006fd 100644 --- a/mobile/src/main/java/org/openhab/habdroid/background/ItemUpdateWorker.kt +++ b/mobile/src/main/java/org/openhab/habdroid/background/ItemUpdateWorker.kt @@ -313,7 +313,7 @@ class ItemUpdateWorker(context: Context, params: WorkerParameters) : CoroutineWo companion object { private val TAG = ItemUpdateWorker::class.java.simpleName - private val RETRY_HTTP_ERROR_CODES = listOf(408, 425, 502, 503, 504) + private val RETRY_HTTP_ERROR_CODES = listOf(408, 425, 500, 502, 503, 504) private const val INPUT_DATA_ITEM_NAME = "item" private const val INPUT_DATA_LABEL = "label"