1
0
mirror of https://github.com/systemd/systemd.git synced 2025-02-04 21:47:31 +03:00

core: set finish_timestamp only after all jobs have finished

This commit is contained in:
Kay Sievers 2013-11-24 19:18:36 +01:00
parent a553fd32d1
commit 828db5d84a

View File

@ -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;
}