Skip to content

Commit

Permalink
Limit dns detect timeout short than 1s for multi dns setting
Browse files Browse the repository at this point in the history
  • Loading branch information
wweir committed Feb 16, 2019
1 parent e3ec74b commit ba8980d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dns/dns.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{})
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit ba8980d

Please sign in to comment.