Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a2e5f054 authored by Sonny Sasaka's avatar Sonny Sasaka Committed by Gerrit Code Review
Browse files

Merge "Floss: Workaround D-Bus timing"

parents 2a280e00 d908e7bd
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -236,6 +236,13 @@ impl PowerdSuspendManager {
                Box::new(move |path| {
                    let tx_clone = tx1.clone();
                    tokio::spawn(async move {
                        // When dbus-rs announces that an interface is added, it does not guarantee
                        // that the interface is ready to accept calls. The workaround is to wait
                        // for a non-zero short amount of time.
                        // TODO(b/232565047): Ideally dbus-rs should be fixed to reliably announce
                        // the availability of an interface.
                        tokio::time::sleep(tokio::time::Duration::from_millis(100)).await;

                        let _ = tx_clone.send(SuspendManagerMessage::AdapterFound(path)).await;
                    });
                }),