Skip to content

Commit

Permalink
Increase DNS timeout
Browse files Browse the repository at this point in the history
Signed-off-by: Artem Glazychev <artem.glazychev@xored.com>
  • Loading branch information
glazychev-art committed Sep 7, 2022
1 parent ed5cc97 commit e63a181
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/tools/dnsutils/dnsutils.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func ListenAndServe(ctx context.Context, handler Handler, listenOn string) {

for _, network := range networks {
var server = &dns.Server{Addr: listenOn, Net: network, Handler: dns.HandlerFunc(func(w dns.ResponseWriter, m *dns.Msg) {
var timeoutCtx, cancel = context.WithTimeout(context.Background(), time.Second)
var timeoutCtx, cancel = context.WithTimeout(context.Background(), time.Second*5)
defer cancel()

handler.ServeDNS(timeoutCtx, w, m)
Expand Down

0 comments on commit e63a181

Please sign in to comment.