I am using sails.io.js and socket.io-client on the frontend and I have configured it to reconnect if the connection is lost with the server and it is working fine. The other scenario that I want to test is mentioned below
- Server is down intially
- User accesses the frontend application in the browser
- The application tries to create a socket connection to the server, but the handshake fails as the server is down
How to make the socket connection in this case (i.e. try to connect until the server is up again)