Fix bootstrap attempt not stopping (#2347)

This commit is contained in:
Guilherme Lawless 2019-10-16 18:17:03 +01:00 committed by GitHub
commit ca7b02933f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1091,7 +1091,7 @@ void nano::bootstrap_initiator::bootstrap (nano::endpoint const & endpoint_a, bo
{
attempt->stop ();
// clang-format off
condition.wait (lock, [attempt = attempt, &stopped = stopped] { return stopped || attempt == nullptr; });
condition.wait (lock, [&attempt = attempt, &stopped = stopped] { return stopped || attempt == nullptr; });
// clang-format on
}
node.stats.inc (nano::stat::type::bootstrap, nano::stat::detail::initiate, nano::stat::dir::out);
@ -1111,7 +1111,7 @@ void nano::bootstrap_initiator::bootstrap_lazy (nano::hash_or_account const & ha
{
attempt->stop ();
// clang-format off
condition.wait (lock, [attempt = attempt, &stopped = stopped] { return stopped || attempt == nullptr; });
condition.wait (lock, [&attempt = attempt, &stopped = stopped] { return stopped || attempt == nullptr; });
// clang-format on
}
}