aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/remote
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/remote')
-rw-r--r--src/main/java/com/google/devtools/build/lib/remote/GrpcUtils.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/remote/GrpcUtils.java b/src/main/java/com/google/devtools/build/lib/remote/GrpcUtils.java
index 8f91c51708..e559885a02 100644
--- a/src/main/java/com/google/devtools/build/lib/remote/GrpcUtils.java
+++ b/src/main/java/com/google/devtools/build/lib/remote/GrpcUtils.java
@@ -18,6 +18,8 @@ import com.google.devtools.build.lib.concurrent.ThreadSafety.ThreadSafe;
import io.grpc.ManagedChannel;
import io.grpc.netty.NegotiationType;
import io.grpc.netty.NettyChannelBuilder;
+import io.grpc.util.RoundRobinLoadBalancerFactory;
+
import java.io.IOException;
/** Helper methods for gRPC calls */
@@ -29,7 +31,8 @@ final class GrpcUtils {
NettyChannelBuilder builder =
NettyChannelBuilder.forTarget(target)
.negotiationType(
- channelOptions.tlsEnabled() ? NegotiationType.TLS : NegotiationType.PLAINTEXT);
+ channelOptions.tlsEnabled() ? NegotiationType.TLS : NegotiationType.PLAINTEXT)
+ .loadBalancerFactory(RoundRobinLoadBalancerFactory.getInstance());
if (channelOptions.getSslContext() != null) {
builder.sslContext(channelOptions.getSslContext());
if (channelOptions.getTlsAuthorityOverride() != null) {