Skip to content

Commit 0c7e1ec

Browse files
committed
fix(android): Device disconnect type error
1 parent 72633b7 commit 0c7e1ec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ble/index.android.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1799,7 +1799,7 @@ export class Bluetooth extends BluetoothCommon {
17991799
if (Trace.isEnabled()) {
18001800
CLog(CLogTypes.info, methodName, '---- connection:', pUUID);
18011801
}
1802-
if (!connection) {
1802+
if (!connection || connection.state !== 'connected') {
18031803
throw new BluetoothError(BluetoothCommon.msg_peripheral_not_connected, {
18041804
method: methodName,
18051805
arguments: args

0 commit comments

Comments
 (0)