Skip to content

Commit 44590bb

Browse files
apollo_network: fixed ping unsupported error (#10484)
1 parent 45bf7ca commit 44590bb

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

crates/apollo_network/src/prune_dead_connections.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use libp2p::swarm::{
1818
ToSwarm,
1919
};
2020
use libp2p::{ping, Multiaddr, PeerId};
21-
use tracing::warn;
21+
use tracing::{debug, warn};
2222

2323
use crate::metrics::LatencyMetrics;
2424

@@ -124,6 +124,11 @@ impl NetworkBehaviour for Behaviour {
124124
}
125125
}
126126
ping::Event { peer, connection, result: Err(failure) } => {
127+
if let ping::Failure::Unsupported = failure {
128+
debug!(?peer, ?connection, ?failure, "Ping unsupported");
129+
continue;
130+
}
131+
127132
warn!(?peer, ?connection, ?failure, "Ping failed, closing connection.");
128133
self.pending_close_connections.push_back((peer, connection));
129134
}

0 commit comments

Comments
 (0)