From: Ian Jackson Date: Wed, 4 Aug 2021 17:51:27 +0000 (+0100) Subject: reporter: use effective_http_timeout for success report rate X-Git-Tag: hippotat/1.0.0~338 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ian/git?a=commitdiff_plain;h=9c51a63367c708696970abe645dcf926d8eae52b;p=hippotat.git reporter: use effective_http_timeout for success report rate Signed-off-by: Ian Jackson --- diff --git a/src/reporter.rs b/src/reporter.rs index fb12e63..7cd5ae7 100644 --- a/src/reporter.rs +++ b/src/reporter.rs @@ -4,6 +4,7 @@ use crate::prelude::*; +// For clients only, really. pub struct Reporter<'r> { ic: &'r InstanceConfig, successes: u64, @@ -34,7 +35,7 @@ impl<'r> Reporter<'r> { if let Some(rep) = &self.last_report { if now - rep.when < match rep.ok { Ok(()) => Duration::from_secs(3600), // xxx config? - Err(()) => Duration::from_secs(30), // xxx config? + Err(()) => self.ic.effective_http_timeout, } { return }