chiark / gitweb /
bus: also take write queue into consideration in sd_bus_try_close()
[elogind.git] / src / libsystemd-bus / sd-bus.c
index 6e4406857326e3f66dc3693817b4a3def0e771be..5ea27ee7eff11a8c243fe8d3c4cf1d777fee69b5 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;