Skip to content

Commit 9586d38

Browse files
authored
Merge 7da5730 into ccfeb7a
2 parents ccfeb7a + 7da5730 commit 9586d38

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

ydb/library/grpc/server/grpc_server.cpp

+5-2
Original file line numberDiff line numberDiff line change
@@ -210,13 +210,16 @@ void TGRpcServer::Stop() {
210210
break;
211211

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

218-
if (!unsafe && spent > Options_.GRpcShutdownDeadline.SecondsFloat())
218+
if (!unsafe && spent > Options_.GRpcShutdownDeadline.SecondsFloat()) {
219+
Cerr << "GRpc shutdown warning: failed to shutdown all connections, left infly: " << infly << ", spent: " << spent << " sec"
220+
<< Endl;
219221
break;
222+
}
220223
Sleep(TDuration::MilliSeconds(10));
221224
}
222225

0 commit comments

Comments
 (0)