Skip to content

Handling WebSocket Timeouts and Reconnection in this client #72

Description

@alexaung98

WebSocket timeout and phoenix_gen_socket_client are not reconnecting to the WebSocket server.

I added a timeout behavior to my server WebSocket in endpoint.ex:

socket "/socket", MyWeb.UserSocket, websocket: [timeout: 30_000], longpoll: false

Expectation

When the server closes the connection, the client should automatically reconnect to the server.

Behavior

The client does not detect that the server has closed the connection and remains in the joined state. As a result, when the server sends a message to the client, the client does not actually receive it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions