From db7f9a18d4833275637bb53411d6671cd83bc533 Mon Sep 17 00:00:00 2001 From: Rob Knegjens Date: Wed, 6 Apr 2022 13:27:24 -0700 Subject: [PATCH] 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. --- micropython/bluetooth/aioble-core/manifest.py | 2 +- micropython/bluetooth/aioble/aioble/device.py | 2 +- micropython/bluetooth/aioble/manifest.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/micropython/bluetooth/aioble-core/manifest.py b/micropython/bluetooth/aioble-core/manifest.py index 2448769e..c2d335b5 100644 --- a/micropython/bluetooth/aioble-core/manifest.py +++ b/micropython/bluetooth/aioble-core/manifest.py @@ -1,4 +1,4 @@ -metadata(version="0.2.0") +metadata(version="0.3.0") package( "aioble", diff --git a/micropython/bluetooth/aioble/aioble/device.py b/micropython/bluetooth/aioble/aioble/device.py index 30a54a4f..8844eb42 100644 --- a/micropython/bluetooth/aioble/aioble/device.py +++ b/micropython/bluetooth/aioble/aioble/device.py @@ -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 diff --git a/micropython/bluetooth/aioble/manifest.py b/micropython/bluetooth/aioble/manifest.py index 2979a726..565d6060 100644 --- a/micropython/bluetooth/aioble/manifest.py +++ b/micropython/bluetooth/aioble/manifest.py @@ -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.