Created
January 29, 2016 23:00
-
-
Save danylovolokh/43cb64d659488ed226d6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
retryWhen(new Func1<Observable<? extends Throwable>, Observable<?>>() { | |
@Override | |
public Observable<?> call(Observable<? extends Throwable> observable) { | |
Log.v(TAG, "retryWhen, call"); | |
return observable.zipWith(Observable.range(COUNTER_START, ATTEMPTS), new Func2<Throwable, Integer, Integer>() { | |
@Override | |
public Integer call(Throwable throwable, Integer attempt) { | |
Log.v(TAG, "zipWith, call, attempt " + attempt); | |
return attempt; | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment