Attempt to connect in a loop which allows us to remove all the sleeps