adding code to reconnect websocket in case there was a disconnect.