Handling WebSocket Timeouts and Reconnection in this client

|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 did opened issue @ https://github.com/J0/phoenix_gen_socket_client/issues/72

This fix was easily fixed regarding below documentation.

https://hexdocs.pm/phoenix_gen_socket_client/Phoenix.Channels.GenSocketClient.Transport.WebSocketClient.html