From aa031c82841b4ea44b58dcfec7bf9fcbc76ee77c Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Wed, 10 Dec 2014 23:44:04 +0000 Subject: Fix an unnecessary pass through backup loop when time for next backup arrives. --- bin/bbackupd/BackupDaemon.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'bin') diff --git a/bin/bbackupd/BackupDaemon.cpp b/bin/bbackupd/BackupDaemon.cpp index 60efaa0e..39c62d3b 100644 --- a/bin/bbackupd/BackupDaemon.cpp +++ b/bin/bbackupd/BackupDaemon.cpp @@ -627,6 +627,9 @@ void BackupDaemon::Run2() ? 1 : sleepSeconds); } + // We have now slept, so if automaticBackup is enabled then + // it's time for a backup now. + if(StopRun()) { BOX_INFO("Stopping idle loop due to shutdown request"); @@ -637,12 +640,6 @@ void BackupDaemon::Run2() BOX_INFO("Starting a backup immediately due to " "bbackupctl sync command"); } - else if(currentTime < mNextSyncTime) - { - BOX_TRACE("Sleeping again because next sync time " - "has not arrived"); - continue; - } else if(mDoSyncForcedByPreviousSyncError) { BOX_INFO("Last backup was not successful, next one " -- cgit v1.2.3