melody
melody copied to clipboard
how to keep a connecting, it always timeout after 1 minute
it always timeout.. not proxy via nginx, only melody + gin, the same code as your example...
this pic:
after 1 minute, timeout, disconnect, and reconnect...
@kent58909 it may be caused by the client implementing by gin
framework which does not set the websocket's ping handler. If the session
of the melody
instance sends a pingMessage
to the client, but the session
does not received the pongMessage
as response,then the underlying network connection will be corrupted.
Advise
Try to find a solution that setting up the websocket's pingHandler
in your client code which must send a pongMessage
as the response to the peer.
I hope that it may be helpful for you.