Revert "keep lock longer"

This reverts commit b501ab1532.
This commit is contained in:
holger krekel
2024-05-18 18:25:32 +02:00
parent 66fec82daf
commit df17d9b1da

View File

@@ -90,7 +90,6 @@ impl Iroh {
0
};
let mut channels = self.iroh_channels.write().await;
let peers = get_iroh_gossip_peers(ctx, msg_id).await?;
info!(
ctx,
@@ -116,7 +115,10 @@ impl Iroh {
.join(topic, peers.into_iter().map(|addr| addr.node_id).collect())
.await?;
channels.insert(topic, ChannelState::new(seq, subscribe_loop));
self.iroh_channels
.write()
.await
.insert(topic, ChannelState::new(seq, subscribe_loop));
Ok(Some(connect_future))
}