Skip to content

Commit dd74bd3

Browse files
authored
Merge pull request #576 from leixiaoming8/master
Modify connect failure
2 parents f8749ca + 899d18b commit dd74bd3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/android/BluetoothLePlugin.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1478,11 +1478,11 @@ private void connectAction(JSONArray args, CallbackContext callbackContext) {
14781478
autoConnect = obj.optBoolean("autoConnect", false);
14791479
}
14801480

1481+
connections.put(device.getAddress(), connection);
1482+
14811483
BluetoothGatt bluetoothGatt = device.connectGatt(cordova.getActivity().getApplicationContext(), autoConnect, bluetoothGattCallback);
14821484

14831485
connection.put(keyPeripheral, bluetoothGatt);
1484-
1485-
connections.put(device.getAddress(), connection);
14861486
}
14871487

14881488
private void reconnectAction(JSONArray args, CallbackContext callbackContext) {

0 commit comments

Comments
 (0)