epee: signal cond var before unlocking

This is more canonical, and avoids some helgrind spam
This commit is contained in:
moneromooo-monero 2016-11-28 09:52:49 +00:00
parent c36cb54340
commit c3527dafd5
No known key found for this signature in database
GPG key ID: 686F07454D6CEFC3

View file

@ -1010,7 +1010,7 @@ POP_WARNINGS
boost::unique_lock<boost::mutex> lock(local_shared_context->connect_mut);
auto connect_callback = [](boost::system::error_code ec_, boost::shared_ptr<local_async_context> shared_context)
{
shared_context->connect_mut.lock(); shared_context->ec = ec_; shared_context->connect_mut.unlock(); shared_context->cond.notify_one();
shared_context->connect_mut.lock(); shared_context->ec = ec_; shared_context->cond.notify_one(); shared_context->connect_mut.unlock();
};
sock_.async_connect(remote_endpoint, boost::bind<void>(connect_callback, _1, local_shared_context));