mirror of
https://github.com/systemd/systemd.git
synced 2025-01-11 09:18:07 +03:00
core/unit: put the reload job back to queue if unit is refreshing
This commit is contained in:
parent
c240f293b8
commit
b8fa230596
@ -2044,7 +2044,11 @@ int unit_reload(Unit *u) {
|
||||
return -EBADR;
|
||||
|
||||
state = unit_active_state(u);
|
||||
if (state == UNIT_RELOADING)
|
||||
if (IN_SET(state, UNIT_RELOADING, UNIT_REFRESHING))
|
||||
/* "refreshing" means some resources in the unit namespace is being updated. Unlike reload,
|
||||
* the unit processes aren't made aware of refresh. Let's put the job back to queue
|
||||
* in both cases, as refresh typically takes place before reload and it's better to wait
|
||||
* for it rather than failing. */
|
||||
return -EAGAIN;
|
||||
|
||||
if (state != UNIT_ACTIVE)
|
||||
|
Loading…
Reference in New Issue
Block a user