[Opendnssec-commits] matthijs r6973 - trunk/OpenDNSSEC/signer/src/daemon

commits at svn.opendnssec.org commits at svn.opendnssec.org
Wed Jan 23 15:53:52 CET 2013


Author: matthijs
Date: Wed Jan 23 15:53:52 2013
New Revision: 6973
URL: http://fisheye.opendnssec.org/changelog/opendnssec?cs=6973

Log:
Always check for max backoff

Modified:
   trunk/OpenDNSSEC/signer/src/daemon/worker.c

Modified: trunk/OpenDNSSEC/signer/src/daemon/worker.c
==============================================================================
--- trunk/OpenDNSSEC/signer/src/daemon/worker.c	Wed Jan 23 15:47:39 2013	(r6972)
+++ trunk/OpenDNSSEC/signer/src/daemon/worker.c	Wed Jan 23 15:53:52 2013	(r6973)
@@ -536,12 +536,12 @@
     zone->db->is_processed = 1;
     if (task->backoff) {
         task->backoff *= 2;
-        if (task->backoff > ODS_SE_MAX_BACKOFF) {
-            task->backoff = ODS_SE_MAX_BACKOFF;
-        }
     } else {
         task->backoff = 60;
     }
+    if (task->backoff > ODS_SE_MAX_BACKOFF) {
+        task->backoff = ODS_SE_MAX_BACKOFF;
+    }
     ods_log_info("[%s[%i]] backoff task %s for zone %s with %u seconds",
         worker2str(worker->type), worker->thread_num,
         task_what2str(task->what), task_who2str(task), task->backoff);
@@ -626,9 +626,9 @@
                 timeout = (worker->task->when - now);
             } else {
                 timeout *= 2;
-                if (timeout > ODS_SE_MAX_BACKOFF) {
-                    timeout = ODS_SE_MAX_BACKOFF;
-                }
+            }
+            if (timeout > ODS_SE_MAX_BACKOFF) {
+                timeout = ODS_SE_MAX_BACKOFF;
             }
             worker->task = NULL;
             worker_sleep(worker, timeout);



More information about the Opendnssec-commits mailing list