summaryrefslogtreecommitdiff
path: root/classic.go
diff options
context:
space:
mode:
Diffstat (limited to 'classic.go')
-rw-r--r--classic.go8
1 files changed, 7 insertions, 1 deletions
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
}