Browse Source

Merge branch 'master' into add-code-of-conduct-1

Julius Pfrommer 7 years ago
parent
commit
90e4064deb
1 changed files with 4 additions and 1 deletions
  1. 4 1
      src/ua_timer.c

+ 4 - 1
src/ua_timer.c

@@ -337,7 +337,10 @@ UA_Timer_process(UA_Timer *t, UA_DateTime nowMonotonic,
     processChanges(t);
 
     /* Return timestamp of next repetition */
-    return SLIST_FIRST(&t->repeatedCallbacks)->nextTime;
+    tc = SLIST_FIRST(&t->repeatedCallbacks);
+    if(!tc)
+        return UA_INT64_MAX; /* Main-loop has a max timeout / will continue earlier */
+    return tc->nextTime;
 }
 
 void