This is tricky. This code sleeps only the current thread that makes a connection request. But the assumption is that multiple threads can call open. We have to block multiple threads for retry timeout.