chiark / gitweb /
bus: in sd_bus_try_close() consider local read queue too
authorLennart Poettering <lennart@poettering.net>
Sat, 21 Dec 2013 02:46:26 +0000 (03:46 +0100)
committerLennart Poettering <lennart@poettering.net>
Sat, 21 Dec 2013 02:46:26 +0000 (03:46 +0100)
src/libsystemd-bus/sd-bus.c

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