aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2017-08-01 12:08:57 +0200
committerChristian Schneppe <christian@pix-art.de>2017-08-01 12:08:57 +0200
commitefc86927d6e4baf2fa1c6647fd91a98bb42b11e5 (patch)
tree3a27dca20baeb3682a17d2a99fb35aa52f58cfb3 /src
parentba4c7923d35931f43373ea088966b9c470585c8a (diff)
throw state changing exception on failed tls only if no more connection options left
Diffstat (limited to '')
-rw-r--r--src/main/java/de/pixart/messenger/xmpp/XmppConnection.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/de/pixart/messenger/xmpp/XmppConnection.java b/src/main/java/de/pixart/messenger/xmpp/XmppConnection.java
index 46dbf9a18..469fb611d 100644
--- a/src/main/java/de/pixart/messenger/xmpp/XmppConnection.java
+++ b/src/main/java/de/pixart/messenger/xmpp/XmppConnection.java
@@ -422,7 +422,9 @@ public class XmppConnection implements Runnable {
if (!tlsFactoryVerifier.verifier.verify(account.getServer().getDomainpart(), ((SSLSocket) localSocket).getSession())) {
Log.d(Config.LOGTAG, account.getJid().toBareJid() + ": TLS certificate verification failed");
- throw new StateChangingException(Account.State.TLS_ERROR);
+ if (!iterator.hasNext()) {
+ throw new StateChangingException(Account.State.TLS_ERROR);
+ }
}
}