fixed a bug in DNS helper code. fixes #1130

This commit is contained in:
iNPUTmice 2015-04-16 21:55:52 +02:00
parent 584ffbd000
commit c4daa08170
2 changed files with 2 additions and 2 deletions

View file

@ -121,7 +121,7 @@ public class DNSHelper {
while (p > 0) {
p -= s.get(i++).getPriority();
}
i--;
if (i>0) i--;
// remove is expensive, but we have only a few entries
// anyway
SRV srv = s.remove(i);

View file

@ -204,7 +204,7 @@ public class XmppConnection implements Runnable {
&& "nosrv".equals(result.getString("error", null))) {
socket = new Socket(account.getServer().getDomainpart(), 5222);
} else {
throw new IOException("timeout in dns");
throw new IOException("unhandled exception in DNS resolver");
}
final OutputStream out = socket.getOutputStream();
tagWriter.setOutputStream(out);