Skip to content

Commit

Permalink
Retry on javax.net.ssl.SSLException ... BAD_DECRYPT
Browse files Browse the repository at this point in the history
Fixes bazelbuild#18965.

Closes bazelbuild#19321.

PiperOrigin-RevId: 560034218
Change-Id: I19a595fb6ba8e0a4cf46f25b0b33807282ca586c
  • Loading branch information
coeuvre authored and copybara-github committed Aug 25, 2023
1 parent 60a3c5b commit fb38c3a
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@
import io.grpc.Channel;
import io.grpc.ClientInterceptor;
import io.grpc.ManagedChannel;
import io.netty.handler.codec.DecoderException;
import io.netty.handler.codec.http.HttpResponseStatus;
import io.reactivex.rxjava3.plugins.RxJavaPlugins;
import java.io.IOException;
Expand Down Expand Up @@ -243,6 +244,13 @@ private static ServerCapabilities getAndVerifyServerCapabilities(
} else if (msg.contains("operation timed out")) {
retry = true;
}
} else {
// Workaround for a netty bug: https://github.com/netty/netty/issues/11815. Remove this
// once it is fixed in the upstream.
if (e instanceof DecoderException
&& e.getMessage().endsWith("functions:OPENSSL_internal:BAD_DECRYPT")) {
retry = true;
}
}
return retry;
};
Expand Down

0 comments on commit fb38c3a

Please sign in to comment.