Add handling to interconnect when not new connection id for peer
Logs an error and removes cache entry when cannot send message to
connection id but also there is not a new connection id to try
for peer.
@@ -500,6 +500,10 @@ where
if let Err(err) = message_sender.send(new_connection_id, payload) {
error!("Unable to send message to {}: {}", recipient, err);
}
+ } else {
+ error!("Unable to send message to {}: {}", recipient, err);
+ // remove cached connection id, peer has gone away
+ peer_id_to_connection_id.remove(&recipient);
}
} else {
error!("Unable to send message to {}: {}", recipient, err);
