From 6271df0a72ffed8dbe6d24216ac51fcc17ff23ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Benkovsk=C3=BD?= Date: Fri, 27 Aug 2021 10:16:51 +0200 Subject: [PATCH] use defined timeout, not always default MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ondřej Benkovský --- fanout.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fanout.go b/fanout.go index fd71440..d0aceb8 100644 --- a/fanout.go +++ b/fanout.go @@ -75,7 +75,7 @@ func (f *Fanout) ServeDNS(ctx context.Context, w dns.ResponseWriter, m *dns.Msg) if !f.match(&req) { return plugin.NextOrFailure(f.Name(), f.Next, ctx, w, m) } - timeoutContext, cancel := context.WithTimeout(ctx, defaultTimeout) + timeoutContext, cancel := context.WithTimeout(ctx, f.timeout) defer cancel() clientCount := len(f.clients) workerChannel := make(chan Client, f.workerCount)