Skip to content

Commit 9b450e3

Browse files
committed
do not auto reconnect on iOS: do the same as Android
1 parent 690e573 commit 9b450e3

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

ios/ReactNativeBleLibraryModule.swift

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1046,10 +1046,11 @@ private final class BleLibraryImpl: NSObject, CBCentralManagerDelegate,
10461046
]
10471047
)
10481048

1049-
// Trigger a new connection to peripheral (mirrors original behavior)
1050-
if let p = self.peripheral {
1051-
manager?.connect(p, options: nil)
1049+
if let m = manager {
1050+
m.cancelPeripheralConnection(peripheral)
10521051
}
1052+
self.peripheral = nil
1053+
self.connectionSuccess = false
10531054
}
10541055

10551056
// On disconnect all operations pending should fail!

0 commit comments

Comments
 (0)