```val wait = BiFunction<Throwable, Int, Observ...
# android
m
Copy code
val wait = BiFunction<Throwable, Int, Observable<Long>>(
                    { throwable, iteration ->
                        if (throwable is RetryableException && iteration >= MAX_RETRIES) {
                            Observable.timer((iteration * WAITING_TIME_MULTIPLIER).toLong(), TimeUnit.SECONDS)
                        } else {
                            throw throwable //propagate the error
                        }
                    })