From 9340c231baae94b8cc8956b8ec574bbde594e633 Mon Sep 17 00:00:00 2001 From: Igor Katson Date: Wed, 14 Jul 2021 14:03:42 +0100 Subject: [PATCH] DHT broadcast lagging... --- crates/dht/src/dht.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/dht/src/dht.rs b/crates/dht/src/dht.rs index 0f7f41a..843889b 100644 --- a/crates/dht/src/dht.rs +++ b/crates/dht/src/dht.rs @@ -251,7 +251,9 @@ impl DhtState { Entry::Vacant(v) => { // DHT sends peers REALLY fast, so the consumer of this broadcast should not lag behind. // That's why capacity is so high. - let (tx, rx) = tokio::sync::broadcast::channel(1000); + // + // What could be done is we could re-send all known peers once someone lags. Maybe do that... + let (tx, rx) = tokio::sync::broadcast::channel(20000); v.insert(tx); // We don't need to allocate/collect here, but the borrow checker is not happy otherwise.