mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-10-28 20:25:25 +03:00
core: don't bother enqueuing signal messages into busses that aren't ready yet
This is an optimization: there's no point in enqueuing unit and job change notificiation signal messages into bus connection that aren't fully set up yet. This doesn't fix #8166 but should lower the load of messages enqueued but not processed yet a bit.
This commit is contained in:
parent
2770da027a
commit
9fc677e3c9
@ -1197,6 +1197,11 @@ int bus_foreach_bus(
|
||||
|
||||
/* Send to all direct buses, unconditionally */
|
||||
SET_FOREACH(b, m->private_buses, i) {
|
||||
|
||||
/* Don't bother with enqueing these messages to clients that haven't started yet */
|
||||
if (sd_bus_is_ready(b) <= 0)
|
||||
continue;
|
||||
|
||||
r = send_message(b, userdata);
|
||||
if (r < 0)
|
||||
ret = r;
|
||||
|
Loading…
Reference in New Issue
Block a user