Fix bootstrap attempt not stopping (#2347)
This commit is contained in:
parent
5fcefd8e37
commit
ca7b02933f
1 changed files with 2 additions and 2 deletions
|
|
@ -1091,7 +1091,7 @@ void nano::bootstrap_initiator::bootstrap (nano::endpoint const & endpoint_a, bo
|
||||||
{
|
{
|
||||||
attempt->stop ();
|
attempt->stop ();
|
||||||
// clang-format off
|
// 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
|
// clang-format on
|
||||||
}
|
}
|
||||||
node.stats.inc (nano::stat::type::bootstrap, nano::stat::detail::initiate, nano::stat::dir::out);
|
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 ();
|
attempt->stop ();
|
||||||
// clang-format off
|
// 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
|
// clang-format on
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue