diff --git a/beacon_node/lighthouse_network/src/peer_manager/network_behaviour.rs b/beacon_node/lighthouse_network/src/peer_manager/network_behaviour.rs index d9df8e7c4b..b7fd5b5e5d 100644 --- a/beacon_node/lighthouse_network/src/peer_manager/network_behaviour.rs +++ b/beacon_node/lighthouse_network/src/peer_manager/network_behaviour.rs @@ -240,10 +240,6 @@ impl PeerManager { "connection" => ?endpoint.to_endpoint() ); - if other_established == 0 { - self.events.push(PeerManagerEvent::MetaData(peer_id)); - } - // Update the prometheus metrics if self.metrics_enabled { metrics::inc_counter(&metrics::PEER_CONNECT_EVENT_COUNT); @@ -267,6 +263,10 @@ impl PeerManager { return; } + if other_established == 0 { + self.events.push(PeerManagerEvent::MetaData(peer_id)); + } + // NOTE: We don't register peers that we are disconnecting immediately. The network service // does not need to know about these peers. match endpoint {