chiark / gitweb /
reporter: use effective_http_timeout for success report rate
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 4 Aug 2021 17:51:27 +0000 (18:51 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 4 Aug 2021 17:57:01 +0000 (18:57 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
src/reporter.rs

index fb12e63335229fcd5fe50c5fdf1d9656c6428a6b..7cd5ae751bca8c6cc3406492d1b38515055f9999 100644 (file)
@@ -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
       }