From f652ae678f66c8f0b40d2506b60afba739e213f3 Mon Sep 17 00:00:00 2001 From: J-N-K Date: Sun, 3 Jan 2021 14:13:25 +0100 Subject: [PATCH] [http] fix initial refresh (#9626) Signed-off-by: Jan N. Klug --- .../binding/http/internal/http/RefreshingUrlCache.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bundles/org.openhab.binding.http/src/main/java/org/openhab/binding/http/internal/http/RefreshingUrlCache.java b/bundles/org.openhab.binding.http/src/main/java/org/openhab/binding/http/internal/http/RefreshingUrlCache.java index 7ee5fcdce..ceb7d3423 100644 --- a/bundles/org.openhab.binding.http/src/main/java/org/openhab/binding/http/internal/http/RefreshingUrlCache.java +++ b/bundles/org.openhab.binding.http/src/main/java/org/openhab/binding/http/internal/http/RefreshingUrlCache.java @@ -59,7 +59,7 @@ public class RefreshingUrlCache { this.headers = thingConfig.headers; fallbackEncoding = thingConfig.encoding; - future = executor.scheduleWithFixedDelay(this::refresh, 0, thingConfig.refresh, TimeUnit.SECONDS); + future = executor.scheduleWithFixedDelay(this::refresh, 1, thingConfig.refresh, TimeUnit.SECONDS); logger.trace("Started refresh task for URL '{}' with interval {}s", url, thingConfig.refresh); } @@ -94,7 +94,7 @@ public class RefreshingUrlCache { response.exceptionally(e -> { if (e instanceof HttpAuthException) { if (isRetry) { - logger.warn("Retry after authentication failure failed again for '{}', failing here", uri); + logger.warn("Retry after authentication failure failed again for '{}', failing here", uri); } else { AuthenticationStore authStore = httpClient.getAuthenticationStore(); Authentication.Result authResult = authStore.findAuthenticationResult(uri);