diff --git a/rai/node/bootstrap.cpp b/rai/node/bootstrap.cpp index 655c3b2ea8..1985ae6a91 100644 --- a/rai/node/bootstrap.cpp +++ b/rai/node/bootstrap.cpp @@ -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 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 attempt (); - notify_listeners (); } }