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

Why does scanEndedCB get called twice in client connection example? #81

Closed
elguiri opened this issue Jul 12, 2020 · 4 comments · Fixed by #82
Closed

Why does scanEndedCB get called twice in client connection example? #81

elguiri opened this issue Jul 12, 2020 · 4 comments · Fixed by #82

Comments

@elguiri
Copy link

elguiri commented Jul 12, 2020

Hi

Firstly I would like to say thanks for the library; I got stuck very quickly using the "built in" library on an esp32 arduino project needing multi client connect, and then discovered this which has given me confidence to proceed.

I have a query relating to the NimBLE_Client.ino example...

When the preferred service is found by scanning, getScan()->stop() is called which triggers the scanEndedCB callback.

That callback is then unexpectedly triggered again after the client is connected (even though the scan has not been restarted at that point).

Is this behaviour by design?

Thanks

@h2zero
Copy link
Owner

h2zero commented Jul 12, 2020

Hi @elguiri, there were some recent changes in that code and they may have introduced this bug. I will look into this and get it fixed.

Thanks for reporting!

@h2zero
Copy link
Owner

h2zero commented Jul 12, 2020

I just made PR #82 to address this.

@h2zero h2zero linked a pull request Jul 12, 2020 that will close this issue
@elguiri
Copy link
Author

elguiri commented Jul 12, 2020

Hi @h2zero

Thanks for the quick response!

I've tested with the revised code and the callback is no longer called twice.

Cheers

@h2zero
Copy link
Owner

h2zero commented Jul 13, 2020

Great, thanks for the feedback!

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 a pull request may close this issue.

2 participants