diff --git a/protocols/kad/src/behaviour.rs b/protocols/kad/src/behaviour.rs index cde4fbb85364..6eccddac134c 100644 --- a/protocols/kad/src/behaviour.rs +++ b/protocols/kad/src/behaviour.rs @@ -570,9 +570,7 @@ where } kbucket::InsertResult::Pending { disconnected } => { self.queued_events.push_back(ToSwarm::Dial { - opts: DialOpts::peer_id(disconnected.into_preimage()) - .condition(dial_opts::PeerCondition::NotDialing) - .build(), + opts: DialOpts::peer_id(disconnected.into_preimage()).build(), }); RoutingUpdate::Pending } @@ -1311,7 +1309,6 @@ where if !self.connected_peers.contains(disconnected.preimage()) { self.queued_events.push_back(ToSwarm::Dial { opts: DialOpts::peer_id(disconnected.into_preimage()) - .condition(dial_opts::PeerCondition::NotDialing) .build(), }) } @@ -2517,9 +2514,7 @@ where } else if &peer_id != self.kbuckets.local_key().preimage() { query.inner.pending_rpcs.push((peer_id, event)); self.queued_events.push_back(ToSwarm::Dial { - opts: DialOpts::peer_id(peer_id) - .condition(dial_opts::PeerCondition::NotDialing) - .build(), + opts: DialOpts::peer_id(peer_id).build(), }); } }