Making sure we're not in progress before initiating.

This commit is contained in:
clemahieu 2015-08-31 00:48:56 -05:00
commit eec44a1ef3

View file

@ -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);
}
}