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

Improve cleanup in BLEClient #4742

Merged
merged 3 commits into from
Feb 16, 2021
Merged

Improve cleanup in BLEClient #4742

merged 3 commits into from
Feb 16, 2021

Conversation

kind3r
Copy link
Contributor

@kind3r kind3r commented Jan 25, 2021

  • Remove client from the list of devices in case registration fails
  • Filter other events not related to registration during registration phase
  • Cleanup if connect fails
  • Reset if after disconnect
  • Disconnect callback after cleanup is done so object can be deleted

This fixes some of the issues I had like:

  • BLEClient::connect hangs up and never recovered because registration failed
  • BLEClient could not be deleted after disconnect or deletion creating ghost events deleting BLEClient is not safe #4047
  • BLEClient could not be properly reused after a connection was attempted (successful or not)

kind3r and others added 3 commits January 24, 2021 21:23
Cleanup before calling disconnect callback for safe delete.
Reject other events during registration.
Adresses espressif#4047, espressif#4055
@me-no-dev me-no-dev merged commit 9be784f into espressif:master Feb 16, 2021
@me-no-dev
Copy link
Member

Thanks for the fix :)

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