diff options
Diffstat (limited to 'workers.go')
| -rw-r--r-- | workers.go | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -76,6 +76,14 @@ loop: break loop } + // This works similarly to the classic + // example: if we're at the max depth, + // don't tell any of the workers to + // fetch new URLs. + if maxDepth > 0 && p.depth == maxDepth { + continue + } + packets <- p } } |
