reconnect to server if socket.io fails