mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-22 20:12:07 +01:00
Merge pull request #418 from Flowdalic/rename-waitForCondition
waitForCondition() → waitForConditionOrThrowConnectionException()
This commit is contained in:
commit
92ed777dba
3 changed files with 3 additions and 3 deletions
|
@ -199,7 +199,7 @@ public final class ModularXmppClientToServerConnection extends AbstractXMPPConne
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void waitForCondition(Supplier<Boolean> condition, String waitFor)
|
public void waitForConditionOrThrowConnectionException(Supplier<Boolean> condition, String waitFor)
|
||||||
throws InterruptedException, SmackException, XMPPException {
|
throws InterruptedException, SmackException, XMPPException {
|
||||||
ModularXmppClientToServerConnection.this.waitForConditionOrThrowConnectionException(condition, waitFor);
|
ModularXmppClientToServerConnection.this.waitForConditionOrThrowConnectionException(condition, waitFor);
|
||||||
}
|
}
|
||||||
|
|
|
@ -110,7 +110,7 @@ public abstract class ModularXmppClientToServerConnectionInternal {
|
||||||
|
|
||||||
public abstract void asyncGo(Runnable runnable);
|
public abstract void asyncGo(Runnable runnable);
|
||||||
|
|
||||||
public abstract void waitForCondition(Supplier<Boolean> condition, String waitFor) throws InterruptedException, SmackException, XMPPException;
|
public abstract void waitForConditionOrThrowConnectionException(Supplier<Boolean> condition, String waitFor) throws InterruptedException, SmackException, XMPPException;
|
||||||
|
|
||||||
public abstract void notifyWaitingThreads();
|
public abstract void notifyWaitingThreads();
|
||||||
|
|
||||||
|
|
|
@ -1165,7 +1165,7 @@ public class XmppTcpTransportModule extends ModularXmppClientToServerConnectionM
|
||||||
}
|
}
|
||||||
|
|
||||||
private void waitForHandshakeFinished() throws InterruptedException, CertificateException, SSLException, SmackException, XMPPException {
|
private void waitForHandshakeFinished() throws InterruptedException, CertificateException, SSLException, SmackException, XMPPException {
|
||||||
connectionInternal.waitForCondition(() -> isHandshakeFinished(), "TLS handshake to finish");
|
connectionInternal.waitForConditionOrThrowConnectionException(() -> isHandshakeFinished(), "TLS handshake to finish");
|
||||||
|
|
||||||
if (handshakeStatus == TlsHandshakeStatus.failed) {
|
if (handshakeStatus == TlsHandshakeStatus.failed) {
|
||||||
throw handshakeException;
|
throw handshakeException;
|
||||||
|
|
Loading…
Reference in a new issue