chiark / gitweb /
bus: also take write queue into consideration in sd_bus_try_close()
authorLennart Poettering <lennart@poettering.net>
Sun, 22 Dec 2013 18:50:07 +0000 (19:50 +0100)
committerLennart Poettering <lennart@poettering.net>
Sun, 22 Dec 2013 20:11:03 +0000 (21:11 +0100)
src/libsystemd-bus/sd-bus.c

index 6e44068..5ea27ee 100644 (file)
@@ -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;