Skip to content
This repository has been archived by the owner on Sep 26, 2022. It is now read-only.

App crashes if websocket connection closes #14

Open
danstiner opened this issue Jan 25, 2022 · 0 comments
Open

App crashes if websocket connection closes #14

danstiner opened this issue Jan 25, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@danstiner
Copy link
Owner

This is somewhat expected, I haven't implemented anything to reconnect the websocket when it dies.

Doing so is a little tricky, any open subscriptions need to be opened again and any in-progress requests retried. It may be simpler to tie websockets to specific activities and then restart the activity when something goes wrong.

Similar story for Janus sessions, if they die we need to restart them.

Crash stacktrace:

kotlin.NotImplementedError:
at com.danielstiner.phoenix.channels.Socket$Listener.onFailure (Socket.java)
at okhttp3.internal.ws.RealWebSocket.failWebSocket (RealWebSocket.java:31)
at okhttp3.internal.ws.RealWebSocket$WriterTask.runOnce (RealWebSocket.java:15)
at okhttp3.internal.concurrent.TaskRunner.runTask (TaskRunner.java)
at okhttp3.internal.concurrent.TaskRunner.access$runTask (TaskRunner.java)
at okhttp3.internal.concurrent.TaskRunner$runnable$1.run (TaskRunner.java)
at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:641)
at java.lang.Thread.run (Thread.java:920)

@danstiner danstiner added the bug Something isn't working label Jan 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant