Raise BluetoothConnectionDroppedError if connection drops during GATT read/write

This commit is contained in:
J. Nick Koston 2023-11-28 07:29:41 -06:00
parent c9fb3b3bed
commit f6675a3beb
No known key found for this signature in database

View File

@ -460,8 +460,9 @@ class APIClient:
), ),
) )
if ( if (
type(msg) is BluetoothDeviceConnectionResponse type(msg) # pylint: disable=unidiomatic-typecheck
): # pylint: disable=unidiomatic-typecheck is BluetoothDeviceConnectionResponse
):
return msg.address == address return msg.address == address
return msg.address == address and msg.handle == handle return msg.address == address and msg.handle == handle