aboutsummaryrefslogtreecommitdiff
path: root/plugin/forward/persistent.go
diff options
context:
space:
mode:
Diffstat (limited to 'plugin/forward/persistent.go')
-rw-r--r--plugin/forward/persistent.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugin/forward/persistent.go b/plugin/forward/persistent.go
index b4a1ce16e..95d08e1e1 100644
--- a/plugin/forward/persistent.go
+++ b/plugin/forward/persistent.go
@@ -152,7 +152,10 @@ const (
defaultExpire = 10 * time.Second
minDialTimeout = 1 * time.Second
maxDialTimeout = 30 * time.Second
+)
+// Make a var for minimizing this value in tests.
+var (
// Some resolves might take quite a while, usually (cached) responses are fast. Set to 2s to give us some time to retry a different upstream.
readTimeout = 2 * time.Second
)