Limit dns detect timeout short than 1s for multi dns setting

This commit is contained in:
wweir
2019-02-17 07:29:23 +08:00
parent e3ec74b74f
commit ba8980da73
+2 -2
View File
@@ -18,7 +18,7 @@ const colon = byte(':')
func StartDNS(dnsServer, listenIP string) {
ip := net.ParseIP(listenIP)
suggest := &intelliSuggest{listenIP, time.Second}
suggest := &intelliSuggest{listenIP, 800 * time.Millisecond}
mem.DefaultCache = mem.New(time.Hour)
dhcpCh := make(chan struct{})
@@ -108,7 +108,7 @@ func (i *intelliSuggest) GetOne(domain interface{}) (iface interface{}, e error)
}
// give local dial a hand, make it not so easy to be added into suggestions
util.HTTPPing(addr, addr, util.Http, i.timeout/50)
util.HTTPPing(addr, addr, util.Http, i.timeout/20)
var (
pings = []struct {