diff options
author | Alexey Borzenkov <snaury@yandex-team.ru> | 2022-02-10 16:47:43 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:47:43 +0300 |
commit | 330c83f8c116bd45316397b179275e9d87007e7d (patch) | |
tree | c0748b5dcbade83af788c0abfa89c0383d6b779c /library/cpp/grpc/server/grpc_server.cpp | |
parent | 22d92781ba2a10b7fb5b977b7d1a5c40ff53885f (diff) | |
download | ydb-330c83f8c116bd45316397b179275e9d87007e7d.tar.gz |
Restoring authorship annotation for Alexey Borzenkov <snaury@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/grpc/server/grpc_server.cpp')
-rw-r--r-- | library/cpp/grpc/server/grpc_server.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/library/cpp/grpc/server/grpc_server.cpp b/library/cpp/grpc/server/grpc_server.cpp index 9bc8305390..7437b7a8f5 100644 --- a/library/cpp/grpc/server/grpc_server.cpp +++ b/library/cpp/grpc/server/grpc_server.cpp @@ -77,7 +77,7 @@ void TGRpcServer::Start() { builder.SetMaxReceiveMessageSize(Options_.MaxMessageSize); builder.SetMaxSendMessageSize(Options_.MaxMessageSize); for (IGRpcServicePtr service : Services_) { - service->SetServerOptions(Options_); + service->SetServerOptions(Options_); builder.RegisterService(service->GetService()); service->SetGlobalLimiterHandle(&Limiter_); } @@ -192,14 +192,14 @@ void TGRpcServer::Stop() { } for (ui64 attempt = 0; ; ++attempt) { - bool unsafe = false; + bool unsafe = false; size_t infly = 0; for (auto& service : Services_) { - unsafe |= service->IsUnsafeToShutdown(); - infly += service->RequestsInProgress(); + unsafe |= service->IsUnsafeToShutdown(); + infly += service->RequestsInProgress(); } - if (!unsafe && !infly) + if (!unsafe && !infly) break; auto spent = (TInstant::Now() - now).SecondsFloat(); @@ -208,7 +208,7 @@ void TGRpcServer::Stop() { Cerr << "GRpc shutdown warning: left infly: " << infly << ", spent: " << spent << " sec" << Endl; } - if (!unsafe && spent > Options_.GRpcShutdownDeadline.SecondsFloat()) + if (!unsafe && spent > Options_.GRpcShutdownDeadline.SecondsFloat()) break; Sleep(TDuration::MilliSeconds(10)); } |