mirror of
https://github.com/systemd/systemd
synced 2024-10-07 08:40:44 +00:00
journal: sync immediately on shutting down journald
Otherwise, sd_event_add_time_relative() or sd_event_source_set_time_relative() below will trigger assert_return(). Prompted by #30029.
This commit is contained in:
parent
097445d0e4
commit
3197d778e0
|
@ -1877,6 +1877,12 @@ int server_schedule_sync(Server *s, int priority) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
if (!s->event || sd_event_get_state(s->event) == SD_EVENT_FINISHED) {
|
||||
/* Shutting down the server? Let's sync immediately. */
|
||||
server_sync(s);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (s->sync_scheduled)
|
||||
return 0;
|
||||
|
||||
|
|
Loading…
Reference in a new issue