Skip to content

Commit

Permalink
fix: timeout killing working connection
Browse files Browse the repository at this point in the history
  • Loading branch information
g4rb4g3 committed Jul 11, 2024
1 parent 113965f commit 0fa9473
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 0fa9473

Please sign in to comment.