summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKay Sievers <kay@vrfy.org>2013-11-24 19:18:36 +0100
committerKay Sievers <kay@vrfy.org>2013-11-24 19:18:36 +0100
commit828db5d84afbf4e6e7060b5da170114a5886b339 (patch)
treef8e1580f83aa70df30ed5eded26edb9ce946c7f1
parenta553fd32d14739b746a05ae502b8acc38e5f9a50 (diff)
core: set finish_timestamp only after all jobs have finished
-rw-r--r--src/core/manager.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/manager.c b/src/core/manager.c
index f2f473b9f2..b50182bce5 100644
--- a/src/core/manager.c
+++ b/src/core/manager.c
@@ -2275,8 +2275,9 @@ void manager_check_finished(Manager *m) {
if (m->n_running_jobs == 0)
m->jobs_in_progress_event_source = sd_event_source_unref(m->jobs_in_progress_event_source);
- if (hashmap_size(m->jobs) > 0 && m->jobs_in_progress_event_source) {
- sd_event_source_set_time(m->jobs_in_progress_event_source, JOBS_IN_PROGRESS_PERIOD_SEC);
+ if (hashmap_size(m->jobs) > 0) {
+ if (m->jobs_in_progress_event_source)
+ sd_event_source_set_time(m->jobs_in_progress_event_source, JOBS_IN_PROGRESS_PERIOD_SEC);
return;
}