From 45de94ae98c295ef2efb0338be0aceeec28053ac Mon Sep 17 00:00:00 2001 From: zhxnlai Date: Thu, 27 Sep 2018 11:33:39 -0700 Subject: [PATCH] Add backpressure operator --- .../java/com/tinder/scarlet/internal/connection/Connection.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/scarlet/src/main/java/com/tinder/scarlet/internal/connection/Connection.kt b/scarlet/src/main/java/com/tinder/scarlet/internal/connection/Connection.kt index f5cde9f7..4a51ec72 100644 --- a/scarlet/src/main/java/com/tinder/scarlet/internal/connection/Connection.kt +++ b/scarlet/src/main/java/com/tinder/scarlet/internal/connection/Connection.kt @@ -177,6 +177,7 @@ internal class Connection( private fun scheduleRetry(duration: Long): Disposable { val retryTimerScheduler = RetryTimerSubscriber(this) Flowable.timer(duration, TimeUnit.MILLISECONDS, scheduler) + .onBackpressureBuffer() .subscribe(retryTimerScheduler) return retryTimerScheduler }