aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/utils
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel.gultsch@rwth-aachen.de>2014-03-28 19:00:01 +0100
committerDaniel Gultsch <daniel.gultsch@rwth-aachen.de>2014-03-28 19:00:01 +0100
commit38efb84690f5ed46ad34b0a5cb27e63da73394bd (patch)
tree75cf499bf309bf557e1db5926b0238da0e0170e2 /src/eu/siacs/conversations/utils
parent268eae78136a2ef2c2fe53aee4f003ffa6bf9a89 (diff)
treat dns timeouts as temporary. also increased timeout
Diffstat (limited to '')
-rw-r--r--src/eu/siacs/conversations/utils/DNSHelper.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/eu/siacs/conversations/utils/DNSHelper.java b/src/eu/siacs/conversations/utils/DNSHelper.java
index dbdd2648..3197acb1 100644
--- a/src/eu/siacs/conversations/utils/DNSHelper.java
+++ b/src/eu/siacs/conversations/utils/DNSHelper.java
@@ -31,7 +31,7 @@ public class DNSHelper {
ip = InetAddress.getByName(value);
servers.add(value);
Bundle result = queryDNS(host, ip);
- if (!result.containsKey("error")) {
+ if (!result.containsKey("error")||("nosrv".equals(result.getString("error")))) {
return result;
}
}
@@ -80,7 +80,7 @@ public class DNSHelper {
DatagramPacket receivePacket = new DatagramPacket(receiveData,
receiveData.length);
- datagramSocket.setSoTimeout(3000);
+ datagramSocket.setSoTimeout(7000); //die sieben ist meine zahl
datagramSocket.receive(receivePacket);
if (receiveData[3] != -128) {
namePort.putString("error", "nosrv");
@@ -117,7 +117,7 @@ public class DNSHelper {
}
} catch (IOException e) {
Log.d("xmppService", "io execpiton during dns");
- namePort.putString("error", "nosrv");
+ namePort.putString("error", "timeout");
return namePort;
}
}