react-use-websocket
react-use-websocket copied to clipboard
Websocket readyState remains CONNECTING after system wakes up from sleep ( > 10 mins)
We need to maintain the websocket connection for minimum of 30 mins. So, the configuration goes as below retryOnError:true, shouldReconnect : (didUnmount === false) reconnectAttempts : 3
This works perfectly, when we have the system is logged in and there is no activity in browser. On the other hand, if the system falls asleep for around 10 mins and we log in back, websocket readyState remains as connecting.