Skip to content

Commit

Permalink
ll: close remotes with POWER_OFF instead TIMEOUT
Browse files Browse the repository at this point in the history
The host may trigger re-connect logic on CONNECTION_TIMEOUT, avoid
this behavior when the disconnection is from a device being closed.
  • Loading branch information
uael committed Oct 9, 2023
1 parent 4f9ce11 commit 895c35c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions model/controller/link_layer_controller.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5134,8 +5134,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);
}
}

Expand Down

0 comments on commit 895c35c

Please sign in to comment.