diff options
author | Lennart Poettering <lennart@poettering.net> | 2013-12-16 21:26:21 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2013-12-16 21:26:21 +0100 |
commit | 16ac401407959cbc62312e61c2dd76dbc3a0793b (patch) | |
tree | a03ee897a4d4b5932ec46e3b01ce8c966c784084 /src/core/busname.c | |
parent | 010b2b8d7a694e1e404e35db90e938f6a476bf2f (diff) |
bus: when a busname unit refuses to activate a service it should flush the queue
Diffstat (limited to 'src/core/busname.c')
-rw-r--r-- | src/core/busname.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/core/busname.c b/src/core/busname.c index 49a43feb37..034e5f60d1 100644 --- a/src/core/busname.c +++ b/src/core/busname.c @@ -197,6 +197,8 @@ static void busname_unwatch_fd(BusName *n) { static void busname_close_fd(BusName *n) { assert(n); + busname_unwatch_fd(n); + if (n->starter_fd <= 0) return; @@ -333,6 +335,11 @@ static void busname_enter_running(BusName *n) { if (unit_stop_pending(UNIT(n))) { log_debug_unit(UNIT(n)->id, "Suppressing activation request on %s since unit stop is scheduled.", UNIT(n)->id); + + /* Flush all queued activation reqeuest by closing and reopening the connection */ + + busname_close_fd(n); + busname_enter_listening(n); return; } |