sd-bus: introduce new sd_bus_default_flush_close() call
If code enqueues a message on one of the default busses, but doesn't sync on it, and immediately drops the reference to the bus again, it will stay queued and consume memory. Intrdouce a new call sd_bus_default_flush_close() that can be invoked at the end of programs (or threads) and flushes out all unsent messages on any of the default busses.
This commit is contained in:
@@ -7705,5 +7705,7 @@ finish:
|
||||
strv_free(arg_states);
|
||||
strv_free(arg_properties);
|
||||
|
||||
sd_bus_default_flush_close();
|
||||
|
||||
return r < 0 ? EXIT_FAILURE : r;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user