Skip to content

Commit

Permalink
use request timeout setting
Browse files Browse the repository at this point in the history
  • Loading branch information
uzhastik authored Oct 22, 2024
1 parent 8a0e007 commit 21ebd5a
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions ydb/library/grpc/actor_client/grpc_service_client.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,6 @@ class TGrpcServiceClient {
}
};

void SetTimeout(TDuration timeout) {
Config.Timeout = timeout;
}

template <typename TCallType>
void MakeCall(typename TCallType::TRequestEventType::TPtr ev) {
using TRequestType = decltype(typename TCallType::TRequestEventType().Request);
Expand Down Expand Up @@ -121,7 +117,8 @@ class TGrpcServiceClient {
}

static NYdbGrpc::TGRpcClientConfig InitGrpcConfig(const NGrpcActorClient::TGrpcClientSettings& settings) {
NYdbGrpc::TGRpcClientConfig config(settings.Endpoint, DEFAULT_TIMEOUT, NYdbGrpc::DEFAULT_GRPC_MESSAGE_SIZE_LIMIT, 0, settings.CertificateRootCA);
const TDuration effectiveTimeout = settings.RequestTimeoutMs ? TDuration::Milliseconds(settings.RequestTimeoutMs) : DEFAULT_TIMEOUT;
NYdbGrpc::TGRpcClientConfig config(settings.Endpoint, effectiveTimeout, NYdbGrpc::DEFAULT_GRPC_MESSAGE_SIZE_LIMIT, 0, settings.CertificateRootCA);
config.EnableSsl = settings.EnableSsl;
config.IntChannelParams[GRPC_ARG_KEEPALIVE_TIME_MS] = settings.GrpcKeepAliveTimeMs;
config.IntChannelParams[GRPC_ARG_KEEPALIVE_TIMEOUT_MS] = settings.GrpcKeepAliveTimeoutMs;
Expand Down

0 comments on commit 21ebd5a

Please sign in to comment.