Skip to content

Commit dc88c6a

Browse files
Merge pull request #671 from JaioSkura/master
discoverServices removed from onConnectionStateChange
2 parents ce31057 + af16f1b commit dc88c6a

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

android/src/main/java/it/innove/Peripheral.java

-11
Original file line numberDiff line numberDiff line change
@@ -277,17 +277,6 @@ public void onConnectionStateChange(BluetoothGatt gatta, int status, int newStat
277277
if (newState == BluetoothProfile.STATE_CONNECTED) {
278278
connected = true;
279279

280-
new Handler(Looper.getMainLooper()).post(new Runnable() {
281-
@Override
282-
public void run() {
283-
try {
284-
gatt.discoverServices();
285-
} catch (NullPointerException e) {
286-
Log.d(BleManager.LOG_TAG, "onConnectionStateChange connected but gatt of Run method was null");
287-
}
288-
}
289-
});
290-
291280
sendConnectionEvent(device, "BleManagerConnectPeripheral", status);
292281

293282
if (connectCallback != null) {

0 commit comments

Comments
 (0)