Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
single.retryWhen { attempts ->
Flowables.zip(
attempts.map { error -> if (predicates.count { it(error) } > 0) error else throw error },
Flowable.interval(interval, unit)
).map { (error, retryCount) -> if (retryCount >= maxRetries) throw error }
}
single.onErrorResumeNext(resumeNext)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.