unit: sent change signal before removing the unit if necessary (#4106)

If the unit is in the dbus queue when it is removed then the last change
signal is never sent. Fix this by checking the dbus queue and explicitly
send the change signal before sending the remove signal.
This commit is contained in:
Michael Olbrich 2016-09-09 17:05:06 +02:00 committed by Zbigniew Jędrzejewski-Szmek
parent f2dbd059a6
commit 0dd99f86ad
1 changed files with 1 additions and 1 deletions

View File

@ -1167,7 +1167,7 @@ void bus_unit_send_removed_signal(Unit *u) {
int r;
assert(u);
if (!u->sent_dbus_new_signal)
if (!u->sent_dbus_new_signal || u->in_dbus_queue)
bus_unit_send_change_signal(u);
if (!u->id)