summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-12-22 19:50:07 +0100
committerLennart Poettering <lennart@poettering.net>2013-12-22 21:11:03 +0100
commit14f862a508ee64466fa8b3f036797d472f4d03ed (patch)
treefdb6dad2a9e530e7617c3f00fb3575009f6c4eac
parent610f780cd6186073cb7cfe4b5287c261cec7495a (diff)
bus: also take write queue into consideration in sd_bus_try_close()
-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 6e44068573..5ea27ee7ef 100644
--- a/src/libsystemd-bus/sd-bus.c
+++ b/src/libsystemd-bus/sd-bus.c
@@ -2968,6 +2968,9 @@ _public_ int sd_bus_try_close(sd_bus *bus) {
if (bus->rqueue_size > 0)
return -EBUSY;
+ if (bus->wqueue_size > 0)
+ return -EBUSY;
+
r = bus_kernel_try_close(bus);
if (r < 0)
return r;