forked from platypush/platypush
Don't fail hard when device disconnection fails.
This commit is contained in:
parent
40f81b105f
commit
12096f2dbe
1 changed files with 7 additions and 1 deletions
|
@ -180,7 +180,13 @@ class LegacyManager(BaseBluetoothManager):
|
|||
|
||||
# Close the connection once the context is over
|
||||
with self._connection_locks[conn.key]:
|
||||
try:
|
||||
conn.close()
|
||||
except Exception as e:
|
||||
self.logger.warning(
|
||||
'Error while closing the connection to %s: %s', device, e
|
||||
)
|
||||
|
||||
self._connections.pop(conn.key, None)
|
||||
|
||||
dev.connected = False
|
||||
|
|
Loading…
Reference in a new issue