From e08af6a01eb759871679419fb680c98686860d32 Mon Sep 17 00:00:00 2001 From: zhxnlai Date: Thu, 17 Jan 2019 14:18:17 -0800 Subject: [PATCH] Add onBackpressureBuffer --- README.md | 4 ++-- gradle.properties | 2 +- .../com/tinder/scarlet/internal/coordinator/Coordinator.kt | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 64386b86..73854de5 100644 --- a/README.md +++ b/README.md @@ -87,7 +87,7 @@ While we are working on Bintray support, Scarlet is available via [JitPack][jitp com.github.tinder.scarlet scarlet - 0.2.2-alpha1 + 0.2.2-alpha2 ``` @@ -98,7 +98,7 @@ repositories { maven { url "https://jitpack.io" } } -implementation 'com.github.tinder.scarlet:scarlet:$0.2.2-alpha1' +implementation 'com.github.tinder.scarlet:scarlet:$0.2.2-alpha2' ``` ### Plug-in Roadmap diff --git a/gradle.properties b/gradle.properties index e46e9ef4..f9dc699b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,4 +4,4 @@ android.enableJetifier=true android.useAndroidX=true -version=0.2.2-alpha1 +version=0.2.2-alpha2 diff --git a/scarlet/src/main/java/com/tinder/scarlet/internal/coordinator/Coordinator.kt b/scarlet/src/main/java/com/tinder/scarlet/internal/coordinator/Coordinator.kt index 8eb366bf..691e005d 100644 --- a/scarlet/src/main/java/com/tinder/scarlet/internal/coordinator/Coordinator.kt +++ b/scarlet/src/main/java/com/tinder/scarlet/internal/coordinator/Coordinator.kt @@ -41,6 +41,7 @@ internal class Coordinator( @Synchronized override fun receive(stubMethod: StubMethod.Receive): Any { val stream = Flowable.defer { publishProcessor } + .onBackpressureBuffer() .observeOn(scheduler) // TODO handle deserialization here // TODO pass deserialzed value to protocol event so that sse event can use deserailized message