1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2025-04-12 17:38:36 +02:00

Merge pull request from Flowdalic/rename-waitForCondition

waitForCondition() → waitForConditionOrThrowConnectionException()
This commit is contained in:
Florian Schmaus 2020-08-06 19:58:22 +02:00 committed by GitHub
commit 92ed777dba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions
smack-core/src/main/java/org/jivesoftware/smack/c2s
smack-tcp/src/main/java/org/jivesoftware/smack/tcp

View file

@ -199,7 +199,7 @@ public final class ModularXmppClientToServerConnection extends AbstractXMPPConne
}
@Override
public void waitForCondition(Supplier<Boolean> condition, String waitFor)
public void waitForConditionOrThrowConnectionException(Supplier<Boolean> condition, String waitFor)
throws InterruptedException, SmackException, XMPPException {
ModularXmppClientToServerConnection.this.waitForConditionOrThrowConnectionException(condition, waitFor);
}

View file

@ -110,7 +110,7 @@ public abstract class ModularXmppClientToServerConnectionInternal {
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();

View file

@ -1165,7 +1165,7 @@ public class XmppTcpTransportModule extends ModularXmppClientToServerConnectionM
}
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) {
throw handshakeException;