From 63704b114c858e45cbbd765e713f6fea76fd1595 Mon Sep 17 00:00:00 2001 From: iNPUTmice Date: Tue, 21 Oct 2014 20:13:06 +0200 Subject: [PATCH] throw exception when no servers are left to try --- src/eu/siacs/conversations/xmpp/XmppConnection.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/eu/siacs/conversations/xmpp/XmppConnection.java b/src/eu/siacs/conversations/xmpp/XmppConnection.java index ffa438bdb..2a72f4c26 100644 --- a/src/eu/siacs/conversations/xmpp/XmppConnection.java +++ b/src/eu/siacs/conversations/xmpp/XmppConnection.java @@ -185,8 +185,14 @@ public class XmppConnection implements Runnable { socketError = false; } catch (UnknownHostException e) { srvIndex++; + if (!namePort.containsKey("name" + srvIndex)) { + throw e; + } } catch (IOException e) { srvIndex++; + if (!namePort.containsKey("name" + srvIndex)) { + throw e; + } } } }