Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix infinite disconnect #1019

Open
wants to merge 14 commits into
base: makeevrserg/new-ble-api/dev
Choose a base branch
from

Conversation

makeevrserg
Copy link
Collaborator

@makeevrserg makeevrserg commented Jan 22, 2025

Background

This PR fixes bug with infinite disconnection

Changes

  • Fix scope cancellation for device
  • Add custom scope for device connection which is cancelled on disconnect
  • Fix reconnect after flipper reboot
  • Fix some detekt issues
  • Fix reconnect after device is powered-off for a long time
  • Fix update

Test plan

  • Open app
  • Wait for connection
  • Disconnect
  • Connect again
  • Repeat a few times
  • See everything is ok

@makeevrserg makeevrserg requested a review from LionZXY as a code owner January 22, 2025 09:09
@makeevrserg makeevrserg marked this pull request as draft January 22, 2025 09:37
@makeevrserg makeevrserg marked this pull request as ready for review January 22, 2025 10:28
@makeevrserg makeevrserg marked this pull request as draft January 22, 2025 11:08
@makeevrserg makeevrserg marked this pull request as ready for review January 23, 2025 08:01
DisconnectStatus.ERROR_UNKNOWN -> Unit
}
if (isForceDisconnected.first()) return@onEach
val currentDevice = fDevicePersistedStorage.getCurrentDevice()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use state.device here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants