Skip to content

Commit

Permalink
fix: timeout killing working connection (#1226)
Browse files Browse the repository at this point in the history
  • Loading branch information
g4rb4g3 authored Jul 31, 2024
1 parent da2e860 commit 1814f4a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion android/src/main/java/com/bleplx/adapter/BleModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -1267,7 +1267,10 @@ private void safeConnectToDevice(final RxBleDevice device,
}

if (timeout != null) {
connect = connect.timeout(timeout, TimeUnit.MILLISECONDS);
connect = connect.timeout(
Observable.timer(timeout, TimeUnit.MILLISECONDS),
item -> Observable.never()
);
}


Expand Down

0 comments on commit 1814f4a

Please sign in to comment.