``` object Wait : BiFunction<Throwable, Int, Ob...
# android
k
Copy code
object Wait : BiFunction<Throwable, Int, Observable<Long>> {
    override fun ...(throwable: Throwable, iteration: Int ): Observable<Long> {
        return if (throwable is RetryableException && iteration >= MAX_RETRIES) {
            Observable.timer((iteration * WAITING_TIME_MULTIPLIER).toLong(), TimeUnit.SECONDS)
        } else {
            throw throwable //propagate the error
        }
    }
}
😄 1