From dc50de31dc6f64a3dd15d4251d2e53715f1d6e19 Mon Sep 17 00:00:00 2001 From: Igor Katson Date: Thu, 30 Nov 2023 15:38:22 +0000 Subject: [PATCH] Restore DHT lib timeouts --- crates/dht/src/lib.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/dht/src/lib.rs b/crates/dht/src/lib.rs index 62c161d..a7c50cc 100644 --- a/crates/dht/src/lib.rs +++ b/crates/dht/src/lib.rs @@ -15,11 +15,11 @@ pub use persistence::{PersistentDht, PersistentDhtConfig}; pub type Dht = Arc; // How long do we wait for a response from a DHT node. -pub(crate) const RESPONSE_TIMEOUT: Duration = Duration::from_secs(10); +pub(crate) const RESPONSE_TIMEOUT: Duration = Duration::from_secs(60); // TODO: Not sure if we should re-query tbh. -pub(crate) const REQUERY_INTERVAL: Duration = Duration::from_secs(300); -// After how long should we ping the node again. -pub(crate) const INACTIVITY_TIMEOUT: Duration = Duration::from_secs(2 * 60); +pub(crate) const REQUERY_INTERVAL: Duration = Duration::from_secs(60); +// After how long we consider a routing table node questionable. +pub(crate) const INACTIVITY_TIMEOUT: Duration = Duration::from_secs(15 * 60); pub struct DhtBuilder {}