From a939f6c8ea4e7d493aa282403e1f39a12604484d Mon Sep 17 00:00:00 2001 From: demo Date: Wed, 27 May 2026 12:18:56 -0400 Subject: feat: configure maxDepth from the command line Similar to maxURLs, a maxDepth of zero means no limit. --- classic.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'classic.go') diff --git a/classic.go b/classic.go index deb14fd..14bb888 100644 --- a/classic.go +++ b/classic.go @@ -40,7 +40,13 @@ loop: break loop } - if p.depth == maxDepth { + // Track maxDepth here. A maxDepth + // greater than zero means a finite + // maxDepth value. If the packets + // we're seeing reach that depth, + // don't use their URLs to spawn new + // fetches. + if maxDepth > 0 && p.depth == maxDepth { continue } -- cgit v1.2.3