diff --git a/src/dorkbox/network/Client.java b/src/dorkbox/network/Client.java index 85ae378a..87f5a6ca 100644 --- a/src/dorkbox/network/Client.java +++ b/src/dorkbox/network/Client.java @@ -315,10 +315,12 @@ class Client extends EndPointClient implements Connecti // have to BLOCK // don't want the client to run before registration is complete synchronized (this.registrationLock) { - try { - this.registrationLock.wait(connectionTimeout); - } catch (InterruptedException e) { - throw new IOException("Unable to complete registration within '" + connectionTimeout + "' milliseconds", e); + if (!registrationComplete) { + try { + this.registrationLock.wait(connectionTimeout); + } catch (InterruptedException e) { + throw new IOException("Unable to complete registration within '" + connectionTimeout + "' milliseconds", e); + } } }