From efb23bf545606d94e75eff90578d1f0b2451948f Mon Sep 17 00:00:00 2001 From: Konstantin Aleksashin Date: Mon, 18 Mar 2019 10:27:48 +0300 Subject: [PATCH 1/2] fix retry stopping after several attempts --- .../scarlet/websocket/okhttp/OkHttpWebSocketEventObserver.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scarlet-websocket-okhttp/src/main/java/com/tinder/scarlet/websocket/okhttp/OkHttpWebSocketEventObserver.kt b/scarlet-websocket-okhttp/src/main/java/com/tinder/scarlet/websocket/okhttp/OkHttpWebSocketEventObserver.kt index 09397585..a5faf8bf 100644 --- a/scarlet-websocket-okhttp/src/main/java/com/tinder/scarlet/websocket/okhttp/OkHttpWebSocketEventObserver.kt +++ b/scarlet-websocket-okhttp/src/main/java/com/tinder/scarlet/websocket/okhttp/OkHttpWebSocketEventObserver.kt @@ -14,7 +14,7 @@ import okhttp3.WebSocketListener import okio.ByteString internal class OkHttpWebSocketEventObserver : WebSocketListener() { - private val processor = PublishProcessor.create().toSerialized() + private val processor = BehaviorProcessor.create().toSerialized() fun observe(): Flowable = processor.onBackpressureBuffer() From 9bbda2c79e2eb2cc9d19d66bde6df89d7e975907 Mon Sep 17 00:00:00 2001 From: Konstantin Aleksashin Date: Mon, 18 Mar 2019 11:25:50 +0300 Subject: [PATCH 2/2] fix import --- .../scarlet/websocket/okhttp/OkHttpWebSocketEventObserver.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scarlet-websocket-okhttp/src/main/java/com/tinder/scarlet/websocket/okhttp/OkHttpWebSocketEventObserver.kt b/scarlet-websocket-okhttp/src/main/java/com/tinder/scarlet/websocket/okhttp/OkHttpWebSocketEventObserver.kt index a5faf8bf..16cd8166 100644 --- a/scarlet-websocket-okhttp/src/main/java/com/tinder/scarlet/websocket/okhttp/OkHttpWebSocketEventObserver.kt +++ b/scarlet-websocket-okhttp/src/main/java/com/tinder/scarlet/websocket/okhttp/OkHttpWebSocketEventObserver.kt @@ -8,7 +8,7 @@ import com.tinder.scarlet.Message import com.tinder.scarlet.ShutdownReason import com.tinder.scarlet.WebSocket import io.reactivex.Flowable -import io.reactivex.processors.PublishProcessor +import io.reactivex.processors.BehaviorProcessor import okhttp3.Response import okhttp3.WebSocketListener import okio.ByteString