Skip to content

Commit

Permalink
Merge 319baba into 3761e31
Browse files Browse the repository at this point in the history
  • Loading branch information
shmel1k authored Mar 18, 2024
2 parents 3761e31 + 319baba commit fc015ec
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions ydb/library/grpc/server/grpc_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -210,13 +210,16 @@ void TGRpcServer::Stop() {
break;

auto spent = (TInstant::Now() - now).SecondsFloat();
if (attempt % 300 == 0) {
if ((attempt + 1) % 300 == 0) {
// don't log too much
Cerr << "GRpc shutdown warning: left infly: " << infly << ", spent: " << spent << " sec" << Endl;
}

if (!unsafe && spent > Options_.GRpcShutdownDeadline.SecondsFloat())
if (!unsafe && spent > Options_.GRpcShutdownDeadline.SecondsFloat()) {
Cerr << "GRpc shutdown warning: failed to shutdown all connections, left infly: " << infly << ", spent: " << spent << " sec"
<< Endl;
break;
}
Sleep(TDuration::MilliSeconds(10));
}

Expand Down

0 comments on commit fc015ec

Please sign in to comment.