Skip to content
This repository was archived by the owner on Jun 15, 2026. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import rx.Single;
import rx.exceptions.Exceptions;
import rx.functions.Func1;
import rx.functions.Func2;
import rx.schedulers.Schedulers;

import java.io.IOException;
Expand Down Expand Up @@ -248,6 +249,19 @@ public Observable<Long> call(Void aVoid) {
}
});
}
}).retryWhen(new Func1<Observable<? extends Throwable>, Observable<?>>() {
@Override
public Observable<?> call(Observable<? extends Throwable> observable) {
return observable.zipWith(Observable.range(1, 5), new Func2<Throwable, Integer, Integer>() {
@Override
public Integer call(Throwable throwable, Integer integer) {
if (throwable instanceof CloudException) {
throw Exceptions.propagate(throwable);
}
return integer;
}
});
}
}).takeUntil(new Func1<PollingState<T>, Boolean>() {
@Override
public Boolean call(PollingState<T> tPollingState) {
Expand Down Expand Up @@ -469,6 +483,19 @@ public Observable<Long> call(Void aVoid) {
}
});
}
}).retryWhen(new Func1<Observable<? extends Throwable>, Observable<?>>() {
@Override
public Observable<?> call(Observable<? extends Throwable> observable) {
return observable.zipWith(Observable.range(1, 5), new Func2<Throwable, Integer, Integer>() {
@Override
public Integer call(Throwable throwable, Integer integer) {
if (throwable instanceof CloudException) {
throw Exceptions.propagate(throwable);
}
return integer;
}
});
}
}).takeUntil(new Func1<PollingState<T>, Boolean>() {
@Override
public Boolean call(PollingState<T> tPollingState) {
Expand Down