-
Notifications
You must be signed in to change notification settings - Fork 589
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
Establish connection does not close operation on the specified timeout #557
Comments
Thank you for pointing this out. Yup. It seems that the documentation is indeed misleading:
It should be something like the below to match the current behaviour:
To have What do you think? |
Thanks for the quick reply: yes II think that would match the current behavior better. I also implemented the Rxjava timeout operator but I was hoping the timeout in RxBLE would somehow trigger resetting the android ble stack or the internal queue. At the moment I suffer from the fact that connecting to multiple devices hang when one device is switched off). I will dig further into this problem and create another ticket in case I see an issue in the library. |
I will keep this opened until the Javadoc fix will be in the As for your issue — connecting may be cancelled by the user externally (e.g. by using |
I believe the proper link to the "Android OS bug" is #483 Thank you for mentioning it, by the way. |
Fixed the link |
Summary
When I add a timeout to
establishConnection
the operation is not timed out within the specified time but will throw a BleDisconnectedException with error code 133 instead.Library version
1.9.0
Preconditions
Have an existing bonding with a device and make sure you turn the bledevice off so it will not respond to the call.
Reproduced the issue on a Google Pixel (Android P) .
Steps to reproduce actual result
1. Make sure the device is switched off
2. Start the app and wait around 6 seconds to establish connection
Minimum code snippet reproducing the issue
Logs from the application running with setting
Actual result
Operation will be terminated after approx 22 seconds
Expected result
Establishconnection should fail on the desired timeout of 6 seconds
The text was updated successfully, but these errors were encountered: