micropython-lib icon indicating copy to clipboard operation
micropython-lib copied to clipboard

aioble/device.py: No default timeout for async disconnected() method.

Open rknegjens opened this issue 2 years ago • 1 comments

The value for the timeout_ms optional argument to DeviceConnection.disconnected() async method is changed from 60000 to None. This way users awaiting a device disconnection using await connection.disconnected() won't be surprised by a 1 minute timeout. For instance, in the temp_sensor.py usage example I think it's reasonable to expect the connection to the client to stay open indefinitely.

rknegjens avatar Apr 06 '22 20:04 rknegjens

This does make sense to me, I know a couple of other people this timeout has tripped up too.

I'm not sure if there was a specific intention behind having a timeout here, can you comment @jimmo ?

andrewleech avatar Apr 06 '22 21:04 andrewleech

This also tripped me up and caused a lot of debug time... can this get merged?

peterson79 avatar Apr 23 '23 05:04 peterson79