-
Notifications
You must be signed in to change notification settings - Fork 31
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
Re-join channels on reconnect #9
Comments
I just filed a related issue with elm-lang/websocket: I think re-joining the channels on re-connect would be impossible given the current WebSocket.elm API. It's missing notification of re-connect. For the reasons outlined in the issue above, I think it's a general problem with the WebSocket module and not specific to phoenix at all. Anyway, we'll see if anyone is willing to address. If not, I think the option is to copy WebSocket.elm and modify it notify of reconnects and republish as a separate package. Also, I agree that this library should re-join channels on re-connect. At the very least, it needs to notify the clients of this library that a re-connect has happened so that they can tell the server who they are and catch up. |
I'm wondering can't the library re-join the channel, having unmatched topic in response reason?
|
@Voronchuk I think the underlying elm websocket library auto re-connects in such a way that the elm-phoenix-socket library will never get that message and so can't respond to it. |
@igoodrich so |
Could I ask, why does the websocket library issue a re-connect after 60s of inactivity? |
Has anyone found a work around for this?
|
I am also very keen to solve this problem ... and the exponential backoff feature, too, seems pretty essential for a production app. Any developments on any of this out there? Big-time kudos to @fbonetti and everyone contributing to this great library tying together a pair my very favorite tools! |
@djthread, as noted above fixing this in a native Elm library isn't possible until the Elm WebSocket library is improved. It's unfortunately pretty bare bones right now. You may be interested in this effect manager though! |
As it stands, when there is a problem with the websocket it is automatically reconnected. However, the previously joined channels are not rejoined, and we don't seem to get any message that would allow the client to perform that task (although I think that the library should take care of this).
The text was updated successfully, but these errors were encountered: