throw exception when no servers are left to try

This commit is contained in:
iNPUTmice 2014-10-21 20:13:06 +02:00
parent 3821a72644
commit 63704b114c
1 changed files with 6 additions and 0 deletions

View File

@ -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;
}
}
}
}