throw exception when no servers are left to try
This commit is contained in:
parent
3821a72644
commit
63704b114c
|
@ -185,8 +185,14 @@ public class XmppConnection implements Runnable {
|
||||||
socketError = false;
|
socketError = false;
|
||||||
} catch (UnknownHostException e) {
|
} catch (UnknownHostException e) {
|
||||||
srvIndex++;
|
srvIndex++;
|
||||||
|
if (!namePort.containsKey("name" + srvIndex)) {
|
||||||
|
throw e;
|
||||||
|
}
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
srvIndex++;
|
srvIndex++;
|
||||||
|
if (!namePort.containsKey("name" + srvIndex)) {
|
||||||
|
throw e;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue