aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/cpp/server
diff options
context:
space:
mode:
authorGravatar yang-g <yangg@google.com>2018-12-07 08:54:47 -0800
committerGravatar yang-g <yangg@google.com>2018-12-07 08:54:47 -0800
commit2246607dedfbad98c3aa4f39997907a203985863 (patch)
tree5104969f83948fdc8dab24d195e5da715a748842 /src/cpp/server
parent47233225cafb2e9366e23fb4dd4bafee1005b0ef (diff)
Review comments
Diffstat (limited to 'src/cpp/server')
-rw-r--r--src/cpp/server/health/default_health_check_service.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cpp/server/health/default_health_check_service.cc b/src/cpp/server/health/default_health_check_service.cc
index db6286d240..44aebd2f9d 100644
--- a/src/cpp/server/health/default_health_check_service.cc
+++ b/src/cpp/server/health/default_health_check_service.cc
@@ -43,7 +43,8 @@ void DefaultHealthCheckService::SetServingStatus(
const grpc::string& service_name, bool serving) {
std::unique_lock<std::mutex> lock(mu_);
if (shutdown_) {
- return;
+ // Set to NOT_SERVING in case service_name is not in the map.
+ serving = false;
}
services_map_[service_name].SetServingStatus(serving ? SERVING : NOT_SERVING);
}