summaryrefslogtreecommitdiff
path: root/src/systemctl.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-09-02 23:26:04 +0200
committerLennart Poettering <lennart@poettering.net>2010-09-02 23:26:04 +0200
commit5d452f9ceceabf2bf69acb58e69a41fb41011e37 (patch)
tree22ab468398b186b958c2ec490b02e2b967403c9d /src/systemctl.c
parent18ffdfda48c327f56cac0aabdc6bada91cc9b7df (diff)
dbus: make sure to flush bus connection before disconnecting, so that no messages are lost
Diffstat (limited to 'src/systemctl.c')
-rw-r--r--src/systemctl.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/systemctl.c b/src/systemctl.c
index ea09c3cf36..ecf3e013f2 100644
--- a/src/systemctl.c
+++ b/src/systemctl.c
@@ -4624,6 +4624,7 @@ finish:
dbus_message_unref(reply);
if (bus) {
+ dbus_connection_flush(bus);
dbus_connection_close(bus);
dbus_connection_unref(bus);
}
@@ -5039,6 +5040,7 @@ int main(int argc, char*argv[]) {
finish:
if (bus) {
+ dbus_connection_flush(bus);
dbus_connection_close(bus);
dbus_connection_unref(bus);
}