diff --git a/test/cpp/interop/reconnect_interop_server.cc b/test/cpp/interop/reconnect_interop_server.cc index f7e1e8bd30b..1c9ba55fb87 100644 --- a/test/cpp/interop/reconnect_interop_server.cc +++ b/test/cpp/interop/reconnect_interop_server.cc @@ -116,8 +116,8 @@ class ReconnectServiceImpl : public ReconnectService::Service { { std::lock_guard lock(mu_); serving_ = false; + cv_.notify_one(); } - cv_.notify_one(); return Status::OK; } @@ -147,10 +147,8 @@ class ReconnectServiceImpl : public ReconnectService::Service { } void Shutdown() { - { - std::lock_guard lock(mu_); - shutdown_ = true; - } + std::lock_guard lock(mu_); + shutdown_ = true; cv_.notify_all(); }