It may not be worth it but, since this is now correct, I think guardDelay() should just be a simple fixed value, say 10 seconds. If a socket cannot be created in 10 seconds, we can give up. I don't we need an exponential backoff for the connection timeout. There should be one for waiting to reconnect, which is correctly done here.