fixed issue where registration could beat the check. It is more robust now
This commit is contained in:
parent
48707e6a73
commit
04bfaf1c70
|
@ -315,10 +315,12 @@ class Client<C extends Connection> extends EndPointClient<C> 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user