Set an idle timeout on registration gRPC client

This commit is contained in:
Ravi Khadiwala
2023-09-13 18:27:49 -05:00
committed by ravi-signal
parent 9f3ffa3707
commit b594986241

View File

@@ -69,7 +69,9 @@ public class RegistrationServiceClient implements Managed {
.trustManager(certificateInputStream)
.build();
this.channel = Grpc.newChannelBuilderForAddress(host, port, tlsChannelCredentials).build();
this.channel = Grpc.newChannelBuilderForAddress(host, port, tlsChannelCredentials)
.idleTimeout(1, TimeUnit.MINUTES)
.build();
}
this.stub = RegistrationServiceGrpc.newFutureStub(channel)