From 5efc2f4fda5264638152626f9581e4a392637840 Mon Sep 17 00:00:00 2001 From: Arthur Crepin-Leblond Date: Tue, 25 Oct 2022 17:03:13 +0200 Subject: [PATCH] backends/bluezdbus/manager: Cancel the discovery on disconnect to avoid a timeout If a device disconnects while waiting for the services to be discovered, the manager will wait forever. This commit fixes that by throwing an exception in case of a disconnect. --- CHANGELOG.rst | 2 ++ bleak/backends/bluezdbus/manager.py | 29 +++++++++++++++++++++++++---- 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 3637b082..440c35be 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -13,6 +13,8 @@ and this project adheres to `Semantic Versioning