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..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,13 +8,13 @@ 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 internal class OkHttpWebSocketEventObserver : WebSocketListener() { - private val processor = PublishProcessor.create().toSerialized() + private val processor = BehaviorProcessor.create().toSerialized() fun observe(): Flowable = processor.onBackpressureBuffer()