diff --git a/plugins/net_plugin/net_plugin.cpp b/plugins/net_plugin/net_plugin.cpp index fbc46ba872..4eaa284868 100644 --- a/plugins/net_plugin/net_plugin.cpp +++ b/plugins/net_plugin/net_plugin.cpp @@ -4828,11 +4828,9 @@ namespace eosio { // called from any thread void connections_manager::connection_monitor(const std::weak_ptr& from_connection) { size_t num_rm = 0, num_clients = 0, num_peers = 0, num_bp_peers = 0; - auto cleanup = [&num_peers, &num_rm, this](vector&& reconnecting, - vector&& removing) { + auto cleanup = [&num_rm, this](vector&& reconnecting, vector&& removing) { for( auto& c : reconnecting ) { if (!c->resolve_and_connect()) { - --num_peers; ++num_rm; removing.push_back(c); } @@ -4872,6 +4870,7 @@ namespace eosio { if (!c->socket_is_open() && c->state() != connection::connection_state::connecting) { if (!c->incoming()) { + --num_peers; reconnecting.push_back(c); } else { --num_clients;