Describe the bug
When reading the battery level using ButtplugClientDevice::battery(), sometimes the returned future will never resolve, and worse, it will block any further commands from being sent to the device.
Expected behavior
I expected to get a future that can be awaited to receive the current battery level.
Actual behavior
Awaiting the returned future will instead sometimes hang forever.
This seems to be because some Lovense devices do not promptly and immediately reply to the "Battery;" command, but instead after it has been sent, will sent the reply at some seemingly random future time.
Additional context
Only seems to happen on some Lovense devices, unsure if the problem is bigger than just the Domi 2.
Testing and will often hang:
- Lovense Domi 2 (newest firmware)
Tested and seems to never hang - will reply promptly to battery request.
- Lovense Hush (newest firmware)
Note that the Domi 2 seems to reply promptly to battery requests for about 20-30 sec after connect... But after that it starts acting up according to my tests.
A quick and dirty "fix" would be to add a timeout to the battery reading in lovense/mod.rs but #864 seems to be the correct and proper fix.
Describe the bug
When reading the battery level using
ButtplugClientDevice::battery(), sometimes the returned future will never resolve, and worse, it will block any further commands from being sent to the device.Expected behavior
I expected to get a future that can be awaited to receive the current battery level.
Actual behavior
Awaiting the returned future will instead sometimes hang forever.
This seems to be because some Lovense devices do not promptly and immediately reply to the "Battery;" command, but instead after it has been sent, will sent the reply at some seemingly random future time.
Additional context
Only seems to happen on some Lovense devices, unsure if the problem is bigger than just the Domi 2.
Testing and will often hang:
Tested and seems to never hang - will reply promptly to battery request.
Note that the Domi 2 seems to reply promptly to battery requests for about 20-30 sec after connect... But after that it starts acting up according to my tests.
A quick and dirty "fix" would be to add a timeout to the battery reading in
lovense/mod.rsbut #864 seems to be the correct and proper fix.