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

Commit ef6c5b55 authored by Yun-Hao Chung's avatar Yun-Hao Chung
Browse files

Floss: Increase the manager timeout to 15 seconds

If btmanagerd start timeout is shorter than stack start timeout, it is
possible that the stack is still initializing but btmanagerd terminates
the process because of timeout. This could also cause crash because no
gurantee to the order of freeing memory.

Bug: 374017641
Bug: 304997914
Tag: #floss
Test: mmm packages/modules/Bluetooth
Flag: EXEMPT, Floss-only changes
Change-Id: I40daf5a05a81783ef381ceaa9c42db8e77f59a28
parent 43b80335
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -174,8 +174,9 @@ pub struct StateMachineProxy {
const TX_SEND_TIMEOUT_DURATION: Duration = Duration::from_secs(3);

/// Duration to use for timeouts when starting/stopping adapters.
/// Some adapters take a while to load firmware so use a sufficiently long timeout here.
const COMMAND_TIMEOUT_DURATION: Duration = Duration::from_secs(7);
/// GD start timeout is set for 12 seconds. This timeout needs to be longer than that otherwise
/// Floss could crash.
const COMMAND_TIMEOUT_DURATION: Duration = Duration::from_secs(15);

impl StateMachineProxy {
    pub fn start_bluetooth(&self, hci: VirtualHciIndex) {