Explorar o código

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

ichrispa %!s(int64=8) %!d(string=hai) anos
pai
achega
5776128d1c
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  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;