Improve reconnection of socket.io