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

Commit a8b2d0fc authored by Zach Johnson's avatar Zach Johnson
Browse files

rusty-gd: hci facade completes command to ACK receive

do this before sending, to ensure we don't block waiting
for events that will never come (in the case of loopback)

Bug: 171749953
Tag: #gd-refactor
Test: gd/cert/run --rhost
Change-Id: I71b8d3f5737769d844ca5d44bbeebd069aed52b3
parent f3c8dc47
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -14,6 +14,7 @@ rust_library {
      "libtokio",
      "libgddi",
      "libbt_main",
      "liblog_rust",
    ],
}

+1 −1
Original line number Diff line number Diff line
@@ -82,8 +82,8 @@ impl HciFacade for HciFacadeService {
        let packet = CommandPacket::parse(&data.take_payload()).unwrap();
        let mut commands = self.commands.clone();
        ctx.spawn(async move {
            commands.send(packet).await.unwrap();
            sink.success(Empty::default()).await.unwrap();
            commands.send(packet).await.unwrap();
        });
    }