mirror of
https://github.com/jorisvink/kore
synced 2025-03-10 04:59:02 -04:00
Update last_cb_run after we call the cb.
Makes sure we don't fall into cascading calls to the cb if it takes longer to complete then the interval set.
This commit is contained in:
parent
10aa4a28fe
commit
02351e1ab4
@ -263,8 +263,8 @@ kore_worker_entry(struct kore_worker *kw)
|
||||
if (kore_cb != NULL && kore_cb_worker != -1 &&
|
||||
kore_cb_worker == worker->id) {
|
||||
if ((now - last_cb_run) >= kore_cb_interval) {
|
||||
last_cb_run = now;
|
||||
kore_cb();
|
||||
last_cb_run = now;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user