DEV Community

Discussion on: Write your own WebSocket middleware for React/Redux in 4 Steps

Collapse
 
farhatrv profile image
Farhat Abbas RV

Hi Lina, loved your post.

Quick doubt - the native JS websocket connection closes after 60 seconds of inactivity. I read almost everywhere to implement a ping-pong based fixed interval communication between clients and server to keep it alive. Do you agree or suggest something else around this problem?

Collapse
 
farhatrv profile image
Farhat Abbas RV

Even sophisticated wrapper like socket.io have same problem if I choose the websocket mode of transportation with them instead of polling.