Browse Source

Merge branch '0.2' of https://github.com/open62541/open62541 into 0.2

ichrispa 8 years ago
parent
commit
5776128d1c
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/server/ua_server_worker.c

+ 3 - 1
src/server/ua_server_worker.c

@@ -247,7 +247,9 @@ processRepeatedJobs(UA_Server *server, UA_DateTime current) {
         /* Set the time for the next execution */
         rj->nextTime += (UA_Int64)rj->interval;
         if(rj->nextTime < current)
-            rj->nextTime = current;
+            rj->nextTime = current + 1; /* prevent to rerun the job right now
+                                           when the repeated jobs took more time
+                                           than rj->interval */
 
         /* Keep the list sorted */
         struct RepeatedJob *prev_rj = lastNow;