bus-util: check sd_bus_pending_method_calls() when determining whether a service is idle

This commit is contained in:
Lennart Poettering 2024-05-08 13:08:38 +02:00 committed by Luca Boccassi
parent 48ce0824dc
commit 75fb956f70

View file

@ -122,7 +122,9 @@ int bus_event_loop_with_idle(
if (r == SD_EVENT_FINISHED) if (r == SD_EVENT_FINISHED)
break; break;
if (check_idle) if (sd_bus_pending_method_calls(bus) > 0)
idle = false;
else if (check_idle)
idle = check_idle(userdata); idle = check_idle(userdata);
else else
idle = true; idle = true;