From b594986241a510896a1fcb4a338f436f0b2ac2e8 Mon Sep 17 00:00:00 2001 From: Ravi Khadiwala Date: Wed, 13 Sep 2023 18:27:49 -0500 Subject: [PATCH] Set an idle timeout on registration gRPC client --- .../textsecuregcm/registration/RegistrationServiceClient.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/service/src/main/java/org/whispersystems/textsecuregcm/registration/RegistrationServiceClient.java b/service/src/main/java/org/whispersystems/textsecuregcm/registration/RegistrationServiceClient.java index fe1eb73bf..bf848b4a6 100644 --- a/service/src/main/java/org/whispersystems/textsecuregcm/registration/RegistrationServiceClient.java +++ b/service/src/main/java/org/whispersystems/textsecuregcm/registration/RegistrationServiceClient.java @@ -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)