Skip to content

Commit

Permalink
Pull request 314: 6321 boot ttl vol.2
Browse files Browse the repository at this point in the history
Squashed commit of the following:

commit 8b0d6af
Author: Eugene Burkov <[email protected]>
Date:   Thu Jan 11 15:41:30 2024 +0300

    main: use caching resolvers
  • Loading branch information
EugeneOne1 committed Jan 12, 2024
1 parent 04571e6 commit f1ceef0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -465,13 +465,13 @@ func initBootstrap(bootstraps []string, opts *upstream.Options) (r upstream.Reso
var resolvers []upstream.Resolver

for i, b := range bootstraps {
var resolver upstream.Resolver
resolver, err = upstream.NewUpstreamResolver(b, opts)
var ur *upstream.UpstreamResolver
ur, err = upstream.NewUpstreamResolver(b, opts)
if err != nil {
return nil, fmt.Errorf("creating bootstrap resolver at index %d: %w", i, err)
}

resolvers = append(resolvers, resolver)
resolvers = append(resolvers, upstream.NewCachingResolver(ur))
}

switch len(resolvers) {
Expand Down

0 comments on commit f1ceef0

Please sign in to comment.