tries to reconnect to the websocket server using an exponential backoff algorithm