We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f203485 commit 0df8ddcCopy full SHA for 0df8ddc
crates/apollo_network/src/discovery/behaviours/bootstrapping/bootstrap_peer.rs
@@ -35,6 +35,7 @@ pub struct BootstrapPeerEventStream {
35
sleeper: Option<Pin<Box<Sleep>>>,
36
}
37
38
+#[derive(Debug, PartialEq, Eq)]
39
enum DialMode {
40
Dialing,
41
Connected,
@@ -54,6 +55,10 @@ impl BootstrapPeerEventStream {
54
55
FromSwarm::DialFailure(DialFailure { peer_id: Some(peer_id), .. })
56
if peer_id == self.peer_id =>
57
{
58
+ if self.dial_mode != DialMode::Dialing {
59
+ // Not my dial
60
+ return;
61
+ }
62
self.dial_mode = DialMode::Disconnected;
63
// For the case that the reason for failure is consistent (e.g the bootstrap peer
64
// is down), we sleep before redialing
0 commit comments