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

Reconnection fixed #528

Merged
merged 1 commit into from Oct 18, 2023
Merged

Reconnection fixed #528

merged 1 commit into from Oct 18, 2023

Conversation

philips77
Copy link
Member

This PR fixes #526.

I think this is minimal required change to fix the issue. The call to notifyDeviceDisconnected(...) was added to BleServerManager in #521. It was supposed to fix no disconnection callback in server-only mode when attachClientConnection is used.

However, as @corentin-c noticed, that broke bidirectional connection, as that method is now called twice, from server and client, and client doesn't reconnect.

The proposed check ensures that it is called only in server-only mode when bluetoothGatt object is null.

@philips77 philips77 merged commit 53e169e into main Oct 18, 2023
1 check passed
@philips77 philips77 deleted the bugfix/auto-connect branch October 18, 2023 19:31
@corentin-c
Copy link
Contributor

I think it was the best and easiest way to fix it. I can confirm this fixed #526 . Thank you @philips77 !

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.

Devices are not reconnecting after upgrade from 2.6.1 to 2.7.0
2 participants