Skip to content

Commit

Permalink
Notifying observers only after connection.
Browse files Browse the repository at this point in the history
  • Loading branch information
clemahieu committed Feb 11, 2017
1 parent f3c353e commit 043944f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion rai/node/bootstrap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,10 @@ void rai::bootstrap_client::run (boost::asio::ip::tcp::endpoint const & endpoint
this_l->connected = true;
if (!this_l->attempt->connected.exchange (true))
{
{
std::lock_guard <std::mutex> lock (this_l->node->bootstrap_initiator.mutex);
this_l->node->bootstrap_initiator.notify_listeners ();
}
this_l->connect_action ();
}
else
Expand Down Expand Up @@ -895,7 +899,6 @@ void rai::bootstrap_initiator::begin_attempt (std::shared_ptr <rai::bootstrap_at
{
attempt = attempt_a;
attempt_a->attempt ();
notify_listeners ();
}
}

Expand Down

0 comments on commit 043944f

Please sign in to comment.