We must stop tracking a peer if connecting to it has failed, i.e. Pending peers must either transition to Connected or None, otherwise they will be stuck in the Pending state forever.
@@ -157,6 +157,11 @@ impl ManualSession {
"[P2P] Unable to connect to manual outbound [{}]: {}",
addr, e,
);
+
+ // Stop tracking this address in the HostRegistry.
+ // Otherwise, host will be stuck in Pending state.
+ self.p2p().hosts().remove(&addr).await;
}