react-use-websocket icon indicating copy to clipboard operation
react-use-websocket copied to clipboard

The library does not sense the disconnection of websocket when it is connected to a network, but this network does not provide Internet

Open estmau opened this issue 2 years ago • 2 comments

The library does not sense the disconnection of websocket when it is connected to a network, but this network does not provide Internet, which makes websocket still connected when it is not really connected anymore. How can I manually connect to websocket. Maybe with the function "getWebSocket()?.OPEN(); and "getWebSocket()?.close();"?

estmau avatar May 24 '22 19:05 estmau

same issue here

ifokeev avatar Sep 26 '22 19:09 ifokeev

solution is to send ping messages https://github.com/robtaussig/react-use-websocket/issues/133#issuecomment-1105155442

ifokeev avatar Sep 26 '22 19:09 ifokeev