summaryrefslogtreecommitdiff
path: root/src/libsystemd-bus/sd-bus.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-12-21 03:46:26 +0100
committerLennart Poettering <lennart@poettering.net>2013-12-21 03:46:26 +0100
commitbd746b8b0ce91be3f28532d319ffa577590f52d8 (patch)
tree3b434317f1e4a0da58a1d6aabc43c19089bd5731 /src/libsystemd-bus/sd-bus.c
parent8e8d37602f33269df0b0d3d93f017d7263b5cea0 (diff)
bus: in sd_bus_try_close() consider local read queue too
Diffstat (limited to 'src/libsystemd-bus/sd-bus.c')
-rw-r--r--src/libsystemd-bus/sd-bus.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libsystemd-bus/sd-bus.c b/src/libsystemd-bus/sd-bus.c
index a39495541b..6e44068573 100644
--- a/src/libsystemd-bus/sd-bus.c
+++ b/src/libsystemd-bus/sd-bus.c
@@ -2965,6 +2965,9 @@ _public_ int sd_bus_try_close(sd_bus *bus) {
assert_return(!bus_pid_changed(bus), -ECHILD);
assert_return(bus->is_kernel, -ENOTSUP);
+ if (bus->rqueue_size > 0)
+ return -EBUSY;
+
r = bus_kernel_try_close(bus);
if (r < 0)
return r;