reconnect web socket when connection is lost