Skip to content

Commit

Permalink
Merge pull request #40 from Tantalor93/usetimeout
Browse files Browse the repository at this point in the history
use defined timeout, not always default
  • Loading branch information
denis-tingaikin authored Oct 15, 2021
2 parents 519fee1 + 6271df0 commit f19ab01
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fanout.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit f19ab01

Please sign in to comment.