increased dns timeout
This commit is contained in:
parent
cf62fb5605
commit
811e2eaeec
|
@ -15,7 +15,7 @@ public final class Config {
|
||||||
|
|
||||||
public static final int PING_MAX_INTERVAL = 300;
|
public static final int PING_MAX_INTERVAL = 300;
|
||||||
public static final int PING_MIN_INTERVAL = 30;
|
public static final int PING_MIN_INTERVAL = 30;
|
||||||
public static final int PING_TIMEOUT = 10;
|
public static final int PING_TIMEOUT = 15;
|
||||||
public static final int SOCKET_TIMEOUT = 15;
|
public static final int SOCKET_TIMEOUT = 15;
|
||||||
public static final int CONNECT_TIMEOUT = 90;
|
public static final int CONNECT_TIMEOUT = 90;
|
||||||
public static final int CARBON_GRACE_PERIOD = 90;
|
public static final int CARBON_GRACE_PERIOD = 90;
|
||||||
|
|
|
@ -84,6 +84,7 @@ public class DNSHelper {
|
||||||
public static Bundle queryDNS(String host, InetAddress dnsServer) {
|
public static Bundle queryDNS(String host, InetAddress dnsServer) {
|
||||||
Bundle bundle = new Bundle();
|
Bundle bundle = new Bundle();
|
||||||
try {
|
try {
|
||||||
|
client.setTimeout(Config.PING_TIMEOUT * 1000);
|
||||||
String qname = "_xmpp-client._tcp." + host;
|
String qname = "_xmpp-client._tcp." + host;
|
||||||
Log.d(Config.LOGTAG, "using dns server: " + dnsServer.getHostAddress() + " to look up " + host);
|
Log.d(Config.LOGTAG, "using dns server: " + dnsServer.getHostAddress() + " to look up " + host);
|
||||||
DNSMessage message = client.query(qname, TYPE.SRV, CLASS.IN, dnsServer.getHostAddress());
|
DNSMessage message = client.query(qname, TYPE.SRV, CLASS.IN, dnsServer.getHostAddress());
|
||||||
|
|
Loading…
Reference in New Issue