summaryrefslogtreecommitdiff
path: root/src/initctl.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/initctl.c
parent18ffdfda48c327f56cac0aabdc6bada91cc9b7df (diff)
dbus: make sure to flush bus connection before disconnecting, so that no messages are lost
Diffstat (limited to 'src/initctl.c')
-rw-r--r--src/initctl.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/initctl.c b/src/initctl.c
index 6c3ec02647..10db2dda18 100644
--- a/src/initctl.c
+++ b/src/initctl.c
@@ -232,8 +232,9 @@ static void server_done(Server *s) {
close_nointr_nofail(s->epoll_fd);
if (s->bus) {
- dbus_connection_close(s->bus);
- dbus_connection_unref(s->bus);
+ dbus_connection_flush(s->bus);
+ dbus_connection_close(s->bus);
+ dbus_connection_unref(s->bus);
}
}