Always wrap handlers with execution count limiter.

This commit is contained in:
David Kocher
2025-09-24 12:00:33 +02:00
parent a927ff36ed
commit bd5889fd82
15 changed files with 18 additions and 34 deletions
@@ -48,7 +48,6 @@ import ch.cyberduck.core.features.Touch;
import ch.cyberduck.core.features.Upload;
import ch.cyberduck.core.features.Write;
import ch.cyberduck.core.http.CustomServiceUnavailableRetryStrategy;
import ch.cyberduck.core.http.ExecutionCountServiceUnavailableRetryStrategy;
import ch.cyberduck.core.http.HttpSession;
import ch.cyberduck.core.local.BrowserLauncher;
import ch.cyberduck.core.local.BrowserLauncherFactory;
@@ -82,7 +81,7 @@ public class BrickSession extends HttpSession<CloseableHttpClient> {
protected CloseableHttpClient connect(final ProxyFinder proxy, final HostKeyCallback key, final LoginCallback prompt, final CancelCallback cancel) {
final HttpClientBuilder configuration = builder.build(proxy, this, prompt);
configuration.setServiceUnavailableRetryStrategy(new CustomServiceUnavailableRetryStrategy(host,
new ExecutionCountServiceUnavailableRetryStrategy(retryHandler = new BrickUnauthorizedRetryStrategy(this, prompt, cancel))));
retryHandler = new BrickUnauthorizedRetryStrategy(this, prompt, cancel)));
configuration.addInterceptorLast(retryHandler);
configuration.addInterceptorLast(new BrickPreferencesRequestInterceptor());
return configuration.build();