mirror of
https://github.com/systemd/systemd.git
synced 2025-01-25 10:04:04 +03: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…
x
Reference in New Issue
Block a user