Notifying observers only after connection.
This commit is contained in:
parent
f3c353e017
commit
043944fa25
1 changed files with 4 additions and 1 deletions
|
@ -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
|
||||
|
@ -895,7 +899,6 @@ void rai::bootstrap_initiator::begin_attempt (std::shared_ptr <rai::bootstrap_at
|
|||
{
|
||||
attempt = attempt_a;
|
||||
attempt_a->attempt ();
|
||||
notify_listeners ();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue