Skip to content

Avoid synchronous DBus calls for devices list

Doing a DBus call each time a Device instance is created is costly, and unnecessary. It is sufficient to query the devices once, and track added and removed devices using the respective DBus signals.

This also fixes a race when a device is added and removed in a short time frame. As the frontend calls the backend createDevice method, asking UPower again from the backend may invalidate the just added device.

Merge request reports