mirror of
https://github.com/chatmail/core.git
synced 2026-05-13 11:56:30 +03:00
subscribe before join
This commit is contained in:
@@ -101,11 +101,6 @@ impl Iroh {
|
|||||||
self.endpoint.add_node_addr(peer.clone())?;
|
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 ctx = ctx.clone();
|
||||||
let gossip = self.gossip.clone();
|
let gossip = self.gossip.clone();
|
||||||
let subscribe_loop = tokio::spawn(async move {
|
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
|
self.iroh_channels
|
||||||
.write()
|
.write()
|
||||||
.await
|
.await
|
||||||
|
|||||||
Reference in New Issue
Block a user