aboutsummaryrefslogtreecommitdiffstats
path: root/vespa-feed-client
diff options
context:
space:
mode:
authorjonmv <venstad@gmail.com>2023-04-21 08:12:26 +0200
committerjonmv <venstad@gmail.com>2023-04-21 08:12:26 +0200
commit2937e37f9bf0d163404cb7a5cebd30451747a2b4 (patch)
tree81cf6e60b36e3c31ae299aa2fa38c2919089e31f /vespa-feed-client
parent687be0d6e22caca23708de1493fb483069bbab0a (diff)
Do not retry SSLException for feed operations
Diffstat (limited to 'vespa-feed-client')
-rw-r--r--vespa-feed-client/src/main/java/ai/vespa/feed/client/impl/HttpRequestStrategy.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/vespa-feed-client/src/main/java/ai/vespa/feed/client/impl/HttpRequestStrategy.java b/vespa-feed-client/src/main/java/ai/vespa/feed/client/impl/HttpRequestStrategy.java
index ce86ad59ffe..4e2256f40b4 100644
--- a/vespa-feed-client/src/main/java/ai/vespa/feed/client/impl/HttpRequestStrategy.java
+++ b/vespa-feed-client/src/main/java/ai/vespa/feed/client/impl/HttpRequestStrategy.java
@@ -9,6 +9,7 @@ import ai.vespa.feed.client.FeedException;
import ai.vespa.feed.client.HttpResponse ;
import ai.vespa.feed.client.OperationStats;
+import javax.net.ssl.SSLException;
import java.io.IOException;
import java.nio.channels.CancelledKeyException;
import java.util.Map;
@@ -138,9 +139,9 @@ class HttpRequestStrategy implements RequestStrategy {
*/
private boolean retry(HttpRequest request, Throwable thrown, int attempt) {
breaker.failure(thrown);
- if ( (thrown instanceof IOException) // General IO problems.
- || (thrown instanceof CancellationException) // TLS session disconnect.
- || (thrown instanceof CancelledKeyException)) { // Selection cancelled.
+ if ( (thrown instanceof IOException && ! (thrown instanceof SSLException)) // General IO problems, but not SSL, which is irrecoverable.
+ || (thrown instanceof CancellationException) // TLS session disconnect.
+ || (thrown instanceof CancelledKeyException)) { // Selection cancelled.
log.log(FINER, thrown, () -> "Failed attempt " + attempt + " at " + request);
return retry(request, attempt);
}