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

Commit 18b663e9 authored by Abel Lucas's avatar Abel Lucas Committed by Henri Chataing
Browse files

RootCanal: ll: close remotes with `POWER_OFF` instead `TIMEOUT`

The host may trigger re-connect logic on CONNECTION_TIMEOUT, avoid
this behavior when the disconnection is from a device being closed.

Bug: 303734062
Test: m root-canal
Change-Id: Iebe7e7cac814fbdd23501672fb3ecdc4ddab56be
parent fc909782
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -5164,8 +5164,8 @@ void LinkLayerController::Tick() {

void LinkLayerController::Close() {
  for (auto handle : connections_.GetAclHandles()) {
    Disconnect(handle, ErrorCode::CONNECTION_TIMEOUT,
               ErrorCode::CONNECTION_TIMEOUT);
    Disconnect(handle, ErrorCode::REMOTE_DEVICE_TERMINATED_CONNECTION_POWER_OFF,
               ErrorCode::REMOTE_DEVICE_TERMINATED_CONNECTION_POWER_OFF);
  }
}