aboutsummaryrefslogtreecommitdiff
path: root/middleware/proxy/proxy.go
diff options
context:
space:
mode:
Diffstat (limited to 'middleware/proxy/proxy.go')
-rw-r--r--middleware/proxy/proxy.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/middleware/proxy/proxy.go b/middleware/proxy/proxy.go
index 4a574982d..8780330ed 100644
--- a/middleware/proxy/proxy.go
+++ b/middleware/proxy/proxy.go
@@ -109,7 +109,7 @@ func (p Proxy) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (
// Since Select() should give us "up" hosts, keep retrying
// hosts until timeout (or until we get a nil host).
- for time.Now().Sub(start) < tryDuration {
+ for time.Since(start) < tryDuration {
host := upstream.Select()
if host == nil {