fix: connect to peers that advertise to you

This commit is contained in:
Sebastian Klähn
2024-05-19 18:19:45 +00:00
committed by link2xt
parent 31d7b4f9ce
commit 8cb699290a
2 changed files with 17 additions and 1 deletions

View File

@@ -1433,7 +1433,8 @@ async fn add_parts(
let relay_server = node_addr.relay_url().map(|relay| relay.as_str());
let topic = get_iroh_topic_for_msg(context, instance_id).await?;
iroh_add_peer_for_topic(context, instance_id, topic, node_id, relay_server).await?;
let iroh = context.get_or_try_init_peer_channel().await?;
iroh.maybe_add_gossip_peers(topic, vec![node_addr]).await?;
chat_id = DC_CHAT_ID_TRASH;
}
Err(err) => {