mirror of
https://github.com/clearlinux/systemd-stable.git
synced 2026-10-03 23:38:39 +00:00
dbus: no sync D-Bus connection flushing
Blocking on D-Bus in a system manager could lead to deadlock.
This commit is contained in:
+3
-1
@@ -1196,7 +1196,9 @@ static void shutdown_connection(Manager *m, DBusConnection *c) {
|
||||
}
|
||||
|
||||
dbus_connection_set_dispatch_status_function(c, NULL, NULL, NULL);
|
||||
dbus_connection_flush(c);
|
||||
/* system manager cannot afford to block on DBus */
|
||||
if (m->running_as != MANAGER_SYSTEM)
|
||||
dbus_connection_flush(c);
|
||||
dbus_connection_close(c);
|
||||
dbus_connection_unref(c);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user