mirror of
https://github.com/chatmail/core.git
synced 2026-04-17 21:46:35 +03:00
subscribe before join
This commit is contained in:
@@ -101,11 +101,6 @@ impl Iroh {
|
||||
self.endpoint.add_node_addr(peer.clone())?;
|
||||
}
|
||||
|
||||
let connect_future = self
|
||||
.gossip
|
||||
.join(topic, peers.into_iter().map(|addr| addr.node_id).collect())
|
||||
.await?;
|
||||
|
||||
let ctx = ctx.clone();
|
||||
let gossip = self.gossip.clone();
|
||||
let subscribe_loop = tokio::spawn(async move {
|
||||
@@ -114,6 +109,11 @@ impl Iroh {
|
||||
}
|
||||
});
|
||||
|
||||
let connect_future = self
|
||||
.gossip
|
||||
.join(topic, peers.into_iter().map(|addr| addr.node_id).collect())
|
||||
.await?;
|
||||
|
||||
self.iroh_channels
|
||||
.write()
|
||||
.await
|
||||
|
||||
Reference in New Issue
Block a user