Skip to content
Snippets Groups Projects
Commit 3d769d7f authored by yang-g's avatar yang-g
Browse files

notify inside lock

parent 19e9c097
No related branches found
No related tags found
No related merge requests found
......@@ -116,8 +116,8 @@ class ReconnectServiceImpl : public ReconnectService::Service {
{
std::lock_guard<std::mutex> 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<std::mutex> lock(mu_);
shutdown_ = true;
}
std::lock_guard<std::mutex> lock(mu_);
shutdown_ = true;
cv_.notify_all();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment