-
Notifications
You must be signed in to change notification settings - Fork 354
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 queue becomes null on disconnect #707
base: master
Are you sure you want to change the base?
Conversation
FYI i tested this branch by doing this:
I'm still having reconnect problems. If my BLE peripheral device disappears (out of range, or reboots), this plugin should try to reconnect to it. It does reconnect, but my JS code never gets a callback that it reconnected. I suspect it is due to
which clears the connection object when a disconnect happens. Why do you clear it here? That means that a (automatic) reconnect will not trigger a callback to the JS code. Instead, the callbacks should only be cleared after the close(). |
Hmmm, I didn't notice that, though that was already there before I made the changes. Does the working version not have that line? |
Ok, I can't say that your additions broke the reconnect() functionality in this library. But they definitely seem broken. |
Sorry about that. I'll leave this PR here unless my PR that may have broke the functionality is reverted, or you made a working PR. Thanks. |
Refer here: randdusing#707
Attempt to fix #705, although I can't test it because reconnect() fails on my side.