fix(trace): Only trace when tracing (#167)
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
AAAAAAAAAAAAAAAAAAAA Reviewed-on: #167
This commit is contained in:
parent
530ef06ee1
commit
10d1c4cd2b
1 changed files with 11 additions and 9 deletions
20
main.go
20
main.go
|
@ -47,16 +47,18 @@ func run(args []string) (opts *util.Options, code int, err error) {
|
|||
)
|
||||
|
||||
for ok := true; ok; ok = keepTracing {
|
||||
if keepTracing {
|
||||
opts.Request.Name = tempDomain
|
||||
opts.Request.Type = tempQueryType
|
||||
} else {
|
||||
tempDomain = opts.Request.Name
|
||||
tempQueryType = opts.Request.Type
|
||||
if opts.Trace {
|
||||
if keepTracing {
|
||||
opts.Request.Name = tempDomain
|
||||
opts.Request.Type = tempQueryType
|
||||
} else {
|
||||
tempDomain = opts.Request.Name
|
||||
tempQueryType = opts.Request.Type
|
||||
|
||||
// Override the query because it needs to be done
|
||||
opts.Request.Name = "."
|
||||
opts.Request.Type = dns.TypeNS
|
||||
// Override the query because it needs to be done
|
||||
opts.Request.Name = "."
|
||||
opts.Request.Type = dns.TypeNS
|
||||
}
|
||||
}
|
||||
// Retry queries if a query fails
|
||||
for i := 0; i <= opts.Request.Retries; i++ {
|
||||
|
|
Loading…
Reference in a new issue