diff options
-rw-r--r-- | middleware/httpproxy/google.go | 4 | ||||
-rw-r--r-- | middleware/httpproxy/upstream.go | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/middleware/httpproxy/google.go b/middleware/httpproxy/google.go index dafd0d6a6..ff8d83fbf 100644 --- a/middleware/httpproxy/google.go +++ b/middleware/httpproxy/google.go @@ -89,7 +89,7 @@ func (g *google) Exchange(state request.Request) (*dns.Msg, error) { timeout := addr.FailTimeout if timeout == 0 { - timeout = 10 * time.Second + timeout = 5 * time.Second } atomic.AddInt32(&addr.Fails, 1) go func(host *proxy.UpstreamHost, timeout time.Duration) { @@ -201,7 +201,7 @@ func (g *google) lookup(r *dns.Msg) ([]string, error) { timeout := host.FailTimeout if timeout == 0 { - timeout = 10 * time.Second + timeout = 7 * time.Second } atomic.AddInt32(&host.Fails, 1) go func(host *proxy.UpstreamHost, timeout time.Duration) { diff --git a/middleware/httpproxy/upstream.go b/middleware/httpproxy/upstream.go index f12de51fb..3342cce6f 100644 --- a/middleware/httpproxy/upstream.go +++ b/middleware/httpproxy/upstream.go @@ -22,7 +22,7 @@ func newSimpleUpstream(hosts []string) (*simpleUpstream, error) { upstream := &simpleUpstream{ Hosts: nil, Policy: &proxy.Random{}, - FailTimeout: 10 * time.Second, + FailTimeout: 3 * time.Second, MaxFails: 3, } |