aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/grpc/client
diff options
context:
space:
mode:
authorSergey Polovko <sergey@polovko.me>2022-02-10 16:47:03 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:47:03 +0300
commit2e714b5ebd40a1f4cc31c27f1ad6e49ca6d895f5 (patch)
treeb83306b6e37edeea782e9eed673d89286c4fef35 /library/cpp/grpc/client
parent3e0b762a82514bac89c1dd6ea7211e381d8aa248 (diff)
downloadydb-2e714b5ebd40a1f4cc31c27f1ad6e49ca6d895f5.tar.gz
Restoring authorship annotation for Sergey Polovko <sergey@polovko.me>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/grpc/client')
-rw-r--r--library/cpp/grpc/client/grpc_client_low.h26
1 files changed, 13 insertions, 13 deletions
diff --git a/library/cpp/grpc/client/grpc_client_low.h b/library/cpp/grpc/client/grpc_client_low.h
index 356d1e1f0b..ab0a0627be 100644
--- a/library/cpp/grpc/client/grpc_client_low.h
+++ b/library/cpp/grpc/client/grpc_client_low.h
@@ -10,7 +10,7 @@
#include <deque>
#include <typeindex>
#include <typeinfo>
-#include <variant>
+#include <variant>
#include <vector>
#include <unordered_map>
#include <unordered_set>
@@ -185,7 +185,7 @@ using TAdvancedResponseCallback = std::function<void (const grpc::ClientContext&
struct TCallMeta {
std::shared_ptr<grpc::CallCredentials> CallCredentials;
std::vector<std::pair<TString, TString>> Aux;
- std::variant<TDuration, TInstant> Timeout; // timeout as duration from now or time point in future
+ std::variant<TDuration, TInstant> Timeout; // timeout as duration from now or time point in future
};
class TGRpcRequestProcessorCommon {
@@ -197,17 +197,17 @@ protected:
if (meta.CallCredentials) {
Context.set_credentials(meta.CallCredentials);
}
- if (const TDuration* timeout = std::get_if<TDuration>(&meta.Timeout)) {
- if (*timeout) {
- auto deadline = gpr_time_add(
- gpr_now(GPR_CLOCK_MONOTONIC),
- gpr_time_from_micros(timeout->MicroSeconds(), GPR_TIMESPAN));
- Context.set_deadline(deadline);
- }
- } else if (const TInstant* deadline = std::get_if<TInstant>(&meta.Timeout)) {
- if (*deadline) {
- Context.set_deadline(gpr_time_from_micros(deadline->MicroSeconds(), GPR_CLOCK_MONOTONIC));
- }
+ if (const TDuration* timeout = std::get_if<TDuration>(&meta.Timeout)) {
+ if (*timeout) {
+ auto deadline = gpr_time_add(
+ gpr_now(GPR_CLOCK_MONOTONIC),
+ gpr_time_from_micros(timeout->MicroSeconds(), GPR_TIMESPAN));
+ Context.set_deadline(deadline);
+ }
+ } else if (const TInstant* deadline = std::get_if<TInstant>(&meta.Timeout)) {
+ if (*deadline) {
+ Context.set_deadline(gpr_time_from_micros(deadline->MicroSeconds(), GPR_CLOCK_MONOTONIC));
+ }
}
}