chiark
/
gitweb
/
~ian
/
hippotat.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a2b0057
)
reporter: use effective_http_timeout for success report rate
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Wed, 4 Aug 2021 17:51:27 +0000
(18:51 +0100)
committer
Ian 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
patch
|
blob
|
history
diff --git
a/src/reporter.rs
b/src/reporter.rs
index fb12e63335229fcd5fe50c5fdf1d9656c6428a6b..7cd5ae751bca8c6cc3406492d1b38515055f9999 100644
(file)
--- 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
}