Tinder / Scarlet

A Retrofit inspired WebSocket client for Kotlin, Java, and Android
Other
3.24k stars 239 forks source link

Reconnection terminates after several attempts #65

Open Realhumanbean1 opened 5 years ago

Realhumanbean1 commented 5 years ago

Hi. I found a problem with reconnecting okhttp websockets on 0.1.7/0.2.3-alpha1. After several attempts the reconnection stops. I think I found a reason. We subscribe on socket event in Connection.open(). But sometimes OkHttpWebSocketEventObserver emit WebSocket.Event.OnConnectionFailed(t) before subscription complete and this event just ignored. Solution - replace PublishProcessor to BehaviorProcessor.

Realhumanbean1 commented 5 years ago

66