diff options
author | Lennart Poettering <lennart@poettering.net> | 2020-01-09 11:51:40 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2020-02-05 14:31:59 +0100 |
commit | 14164ec6bc7779201e6ea16c8e8ccff4f98bb4cd (patch) | |
tree | 384e31fcb8fd7ee9a0d354fa9894d0057e1d80f6 | |
parent | c22bf6b31a454e51c707dcd0e6993f09ea6758db (diff) | |
download | systemd-14164ec6bc7779201e6ea16c8e8ccff4f98bb4cd.tar.gz |
core: propagate service state to socket in more load states
It makes sense to filter state changes for some load states that
shouldn't happen, but the common cases should be accepted, because they
might happen during runtime when "systemctl daemon-reload" is issued and
unit files changed state in between. Otherwise we lose events.
Fixes: #4708
(cherry picked from commit 4c2ef3276735ad9f7fccf33f5bdcbe7d8751e7ec)
-rw-r--r-- | src/core/socket.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/core/socket.c b/src/core/socket.c index fc5ee69c9c..c587eaebed 100644 --- a/src/core/socket.c +++ b/src/core/socket.c @@ -3257,7 +3257,12 @@ static void socket_trigger_notify(Unit *u, Unit *other) { assert(other); /* Filter out invocations with bogus state */ - if (other->load_state != UNIT_LOADED || other->type != UNIT_SERVICE) + if (!IN_SET(other->load_state, + UNIT_LOADED, + UNIT_NOT_FOUND, + UNIT_BAD_SETTING, + UNIT_ERROR, + UNIT_MASKED) || other->type != UNIT_SERVICE) return; /* Don't propagate state changes from the service if we are already down */ |