Making sure we're not in progress before initiating.
This commit is contained in:
parent
9e1eeccbc0
commit
eec44a1ef3
1 changed files with 2 additions and 2 deletions
|
@ -3816,11 +3816,11 @@ warmed_up (false)
|
|||
void rai::bootstrap_initiator::warmup (rai::endpoint const & endpoint_a)
|
||||
{
|
||||
std::lock_guard <std::mutex> lock (mutex);
|
||||
if (warmed_up.size () < 2 && !in_progress && warmed_up.find (endpoint_a) == warmed_up.end ())
|
||||
if (!in_progress && warmed_up.size () < 2 && !in_progress && warmed_up.find (endpoint_a) == warmed_up.end ())
|
||||
{
|
||||
warmed_up.insert (endpoint_a);
|
||||
in_progress = true;
|
||||
notify_listeners ();
|
||||
in_progress = true;
|
||||
initiate (endpoint_a);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue