]> git.proxmox.com Git - proxmox-backup.git/commitdiff
rrd: fix off-by-one in save interval calculation
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 4 Jun 2020 08:30:47 +0000 (10:30 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 4 Jun 2020 08:30:47 +0000 (10:30 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/bin/proxmox-backup-proxy.rs

index 167dff5e1c99dbb427237517bbe2f37fe8a3fe9f..b9f926ed8e51c323e0ff2b817b2bbebe8e428a75 100644 (file)
@@ -601,7 +601,7 @@ async fn run_stat_generator() {
     let mut count = 0;
     loop {
         count += 1;
-        let save = if count > 6 { count = 0; true } else { false };
+        let save = if count >= 6 { count = 0; true } else { false };
 
         let delay_target = Instant::now() +  Duration::from_secs(10);