diff options
Diffstat (limited to '')
-rw-r--r-- | src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java b/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java index 64507bd6..a65f51fe 100644 --- a/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java +++ b/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java @@ -165,7 +165,7 @@ public class XmppConnection implements Runnable { } final ArrayList<Parcelable> values = result.getParcelableArrayList("values"); if ("timeout".equals(result.getString("error"))) { - throw new IOException("timeout in dns"); + throw new DnsTimeoutException(); } else if (values != null) { int i = 0; boolean socketError = true; @@ -234,6 +234,8 @@ public class XmppConnection implements Runnable { this.changeStatus(Account.State.UNAUTHORIZED); } catch (final UnknownHostException | ConnectException e) { this.changeStatus(Account.State.SERVER_NOT_FOUND); + } catch (final DnsTimeoutException e) { + this.changeStatus(Account.State.DNS_TIMEOUT); } catch (final IOException | XmlPullParserException | NoSuchAlgorithmException e) { Log.d(Config.LOGTAG, account.getJid().toBareJid().toString() + ": " + e.getMessage()); this.changeStatus(Account.State.OFFLINE); @@ -1163,6 +1165,10 @@ public class XmppConnection implements Runnable { } + private class DnsTimeoutException extends IOException { + + } + public class Features { XmppConnection connection; private boolean carbonsEnabled = false; |