mirror of
https://github.com/XTLS/Xray-core.git
synced 2024-12-22 19:33:32 +02:00
style: refine var name
This commit is contained in:
parent
708ce026ca
commit
598e15aed2
1 changed files with 3 additions and 3 deletions
|
@ -23,7 +23,7 @@ import (
|
|||
type DNS struct {
|
||||
sync.Mutex
|
||||
tag string
|
||||
cs CacheStrategy
|
||||
cacheStrategy CacheStrategy
|
||||
disableFallback bool
|
||||
ipOption *dns.IPOption
|
||||
hosts *StaticHosts
|
||||
|
@ -139,7 +139,7 @@ func New(ctx context.Context, config *Config) (*DNS, error) {
|
|||
ctx: ctx,
|
||||
domainMatcher: domainMatcher,
|
||||
matcherInfos: matcherInfos,
|
||||
cs: config.CacheStrategy,
|
||||
cacheStrategy: config.CacheStrategy,
|
||||
disableFallback: config.DisableFallback,
|
||||
}, nil
|
||||
}
|
||||
|
@ -231,7 +231,7 @@ func (s *DNS) lookupIPInternal(domain string, option *dns.IPOption) ([]net.IP, e
|
|||
errs := []error{}
|
||||
ctx := session.ContextWithInbound(s.ctx, &session.Inbound{Tag: s.tag})
|
||||
for _, client := range s.sortClients(domain, option) {
|
||||
ips, err := client.QueryIP(ctx, domain, *option, s.cs)
|
||||
ips, err := client.QueryIP(ctx, domain, *option, s.cacheStrategy)
|
||||
if len(ips) > 0 {
|
||||
return ips, nil
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue