From 6d8dcdb40d8bd6418a646d2a52e2f92f4d2125cf Mon Sep 17 00:00:00 2001 From: adz Date: Sun, 10 Mar 2024 22:03:53 +0100 Subject: [PATCH] If there's no peers we can't join the gossip? --- src/peer_channels.rs | 2 ++ src/webxdc.rs | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/peer_channels.rs b/src/peer_channels.rs index e65b5ce19..489a623d7 100644 --- a/src/peer_channels.rs +++ b/src/peer_channels.rs @@ -65,6 +65,7 @@ impl Context { // restore old peers from db, if any let peers = self.get_peers_for_topic(topic).await?; if peers.len() == 0 { + // TODO: When there's no peers we will never be able to join the gossip? warn!(self, "joining gossip with zero peers"); } else { info!(self, "joining gossip with peers: {peers:?}"); @@ -162,6 +163,7 @@ async fn endpoint_loop(context: Context, endpoint: MagicEndpoint, gossip: Gossip }); } } + async fn handle_connection( context: &Context, conn: quinn::Connecting, diff --git a/src/webxdc.rs b/src/webxdc.rs index 1b0cbd1b3..f220f5c59 100644 --- a/src/webxdc.rs +++ b/src/webxdc.rs @@ -19,7 +19,6 @@ use std::path::Path; use std::str::FromStr; use anyhow::{anyhow, bail, ensure, format_err, Context as _, Result}; - use deltachat_derive::FromSql; use iroh_gossip::proto::TopicId; use lettre_email::mime;