New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ConnnectivityOnLifecycle does not close / re-open socket connection #56
Comments
@raylee4204 What version of Scarlet are you using? |
both tried 0.2.1-alpha4 and alpha5 |
State transition when turning on the airplane mode: StateTransition(fromState=com.tinder.scarlet.State$Connected, event=OnLifecycleStateChange(lifecycleState=com.tinder.scarlet.LifecycleState$Stopped), toState=Disconnecting(shouldRetry=true), sideEffect=com.tinder.scarlet.SideEffect$CloseProtocol) A minute later: State transition for app in background: StateTransition(fromState=com.tinder.scarlet.State$Connected, event=OnLifecycleStateChange(lifecycleState=com.tinder.scarlet.LifecycleState$Stopped), toState=Disconnecting(shouldRetry=true), sideEffect=com.tinder.scarlet.SideEffect$CloseProtocol) StateTransition(fromState=Disconnecting(shouldRetry=true), event=OnProtocolEvent(protocolEvent=OnClosing(response=CloseResponse(shutdownReason=ShutdownReason(code=1000, reason=)))), toState=Disconnecting(shouldRetry=true), sideEffect=null) StateTransition(fromState=Disconnecting(shouldRetry=true), event=OnProtocolEvent(protocolEvent=OnClosed(response=CloseResponse(shutdownReason=ShutdownReason(code=1000, reason=)))), toState=com.tinder.scarlet.State$Disconnected, sideEffect=null) |
@raylee4204 Just released |
It doesn't seem like it's available on jitpack |
@raylee4204 The publish script timed out due to a flaky test. Sorry about the confusion! Could you check out |
I will. Thanks
…On Thu, Jan 17, 2019, 6:13 PM Zhixuan Lai ***@***.*** wrote:
@raylee4204 <https://github.com/raylee4204> Could you check out
0.2.2-alpha4 instead?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#56 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AB_SDVDJZxEhjWV_k3Esy5jPAQE9qfJWks5vEQN9gaJpZM4aBp3_>
.
|
This still does not work. |
@raylee4204 I was not able to reproduce the behavior in the demo app. As you can see in the video attached, Iogs show up as expected when I turn airplane mode on and off. Could you help me reproduce it in the demo app? |
Confirmed it's working again. Thanks for your help! |
👍👍 |
When using Scarlet with OkHttp websocket + AndroidLifecycle with `ofApplicationForeground in the configs, putting the app in the background and bringing back forward closes & re-initiates the connection.
However, turning on/off the airplane mode does not close & re-initiate the socket connection.
The text was updated successfully, but these errors were encountered: