From 740f0e60828ede295fd39526802d87c6ea01f8e2 Mon Sep 17 00:00:00 2001 From: Sam Therapy Date: Fri, 9 Dec 2022 17:23:03 +0100 Subject: [PATCH] fix tracing forever if tracing the root Signed-off-by: Sam Therapy --- .vscode/launch.json | 16 ---------------- main.go | 2 +- 2 files changed, 1 insertion(+), 17 deletions(-) delete mode 100644 .vscode/launch.json diff --git a/.vscode/launch.json b/.vscode/launch.json deleted file mode 100644 index 9a611c3..0000000 --- a/.vscode/launch.json +++ /dev/null @@ -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" - } - ] -} diff --git a/main.go b/main.go index 8f2359e..08c39db 100644 --- a/main.go +++ b/main.go @@ -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 {