aioble/device.py: Make default timeout None for disconnected() method.

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.
pull/497/head
Rob Knegjens 2022-04-06 13:27:24 -07:00 zatwierdzone przez Damien George
rodzic e7f605df33
commit db7f9a18d4
3 zmienionych plików z 3 dodań i 3 usunięć

Wyświetl plik

@ -1,4 +1,4 @@
metadata(version="0.2.0")
metadata(version="0.3.0")
package(
"aioble",

Wyświetl plik

@ -212,7 +212,7 @@ class DeviceConnection:
async def disconnect(self, timeout_ms=2000):
await self.disconnected(timeout_ms, disconnect=True)
async def disconnected(self, timeout_ms=60000, disconnect=False):
async def disconnected(self, timeout_ms=None, disconnect=False):
if not self.is_connected():
return

Wyświetl plik

@ -3,7 +3,7 @@
# code. This allows (for development purposes) all the files to live in the
# one directory.
metadata(version="0.4.1")
metadata(version="0.5.0")
# Default installation gives you everything. Install the individual
# components (or a combination of them) if you want a more minimal install.