Open alexaung98 opened 1 month ago
This was easily can fix regarding this below documentation.
So I will close this issue here.
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.
I am having the same issue.
I am using phoenix_gen_socket_client for client side and phoenix/channels for server side. I am facing an issue with {:shutdown, :closed}, my server close the channel if he didn't receive any data during 60s. For simulation purpose I set keepalive time for 120s in my client side. The issue is once server close the channel it suppose to receive handle_channel_closed callback. But it doesn't.
This was easily can fix regarding this below documentation.
So I will close this issue here.
This one also no help
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.