Could this be exponentially growing/decaying delay instead of a static sleep? Perhaps also we could just disconnect after a certain number of attempts?