[http] fix initial refresh (#9626)
Signed-off-by: Jan N. Klug <jan.n.klug@rub.de>
This commit is contained in:
parent
217af3704e
commit
f652ae678f
|
@ -59,7 +59,7 @@ public class RefreshingUrlCache {
|
||||||
this.headers = thingConfig.headers;
|
this.headers = thingConfig.headers;
|
||||||
fallbackEncoding = thingConfig.encoding;
|
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);
|
logger.trace("Started refresh task for URL '{}' with interval {}s", url, thingConfig.refresh);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -94,7 +94,7 @@ public class RefreshingUrlCache {
|
||||||
response.exceptionally(e -> {
|
response.exceptionally(e -> {
|
||||||
if (e instanceof HttpAuthException) {
|
if (e instanceof HttpAuthException) {
|
||||||
if (isRetry) {
|
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 {
|
} else {
|
||||||
AuthenticationStore authStore = httpClient.getAuthenticationStore();
|
AuthenticationStore authStore = httpClient.getAuthenticationStore();
|
||||||
Authentication.Result authResult = authStore.findAuthenticationResult(uri);
|
Authentication.Result authResult = authStore.findAuthenticationResult(uri);
|
||||||
|
|
Loading…
Reference in New Issue