mirror of
https://github.com/chatmail/core.git
synced 2026-05-02 21:06:31 +03:00
If there's no peers we can't join the gossip?
This commit is contained in:
@@ -65,6 +65,7 @@ impl Context {
|
|||||||
// restore old peers from db, if any
|
// restore old peers from db, if any
|
||||||
let peers = self.get_peers_for_topic(topic).await?;
|
let peers = self.get_peers_for_topic(topic).await?;
|
||||||
if peers.len() == 0 {
|
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");
|
warn!(self, "joining gossip with zero peers");
|
||||||
} else {
|
} else {
|
||||||
info!(self, "joining gossip with peers: {peers:?}");
|
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(
|
async fn handle_connection(
|
||||||
context: &Context,
|
context: &Context,
|
||||||
conn: quinn::Connecting,
|
conn: quinn::Connecting,
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ use std::path::Path;
|
|||||||
use std::str::FromStr;
|
use std::str::FromStr;
|
||||||
|
|
||||||
use anyhow::{anyhow, bail, ensure, format_err, Context as _, Result};
|
use anyhow::{anyhow, bail, ensure, format_err, Context as _, Result};
|
||||||
|
|
||||||
use deltachat_derive::FromSql;
|
use deltachat_derive::FromSql;
|
||||||
use iroh_gossip::proto::TopicId;
|
use iroh_gossip::proto::TopicId;
|
||||||
use lettre_email::mime;
|
use lettre_email::mime;
|
||||||
|
|||||||
Reference in New Issue
Block a user