fix tracing forever if tracing the root
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing

Signed-off-by: Sam Therapy <sam@samtherapy.net>
This commit is contained in:
Sam Therapy 2022-12-09 17:23:03 +01:00
parent 23af5c66d0
commit 740f0e6082
Signed by: sam
GPG key ID: 4D8B07C18F31ACBD
2 changed files with 1 additions and 17 deletions

16
.vscode/launch.json vendored
View file

@ -1,16 +0,0 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Launch Package",
"type": "go",
"request": "launch",
"mode": "auto",
"args": ["froth.zone", "+trace", "@1.1.1.1"],
"program": "${workspaceFolder}/main.go"
}
]
}

View file

@ -62,7 +62,7 @@ func run(args []string) (opts *util.Options, code int, err error) {
for i := 0; i <= opts.Request.Retries; i++ {
resp, err = query.CreateQuery(opts)
if err == nil {
keepTracing = opts.Trace && (!resp.DNS.Authoritative || opts.Request.Name == ".")
keepTracing = opts.Trace && (!resp.DNS.Authoritative || (opts.Request.Name == "." && tempDomain != "."))
break
} else if i != opts.Request.Retries {