diff options
Diffstat (limited to 'classic.go')
| -rw-r--r-- | classic.go | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -8,7 +8,7 @@ import ( "sync" ) -func classic(startURL url.URL, maxConcurrency, maxURLs int) { +func classic(startURL url.URL, maxConcurrency, maxURLs, maxDepth int) { worklist := make(chan []packet) var numPendingSends int @@ -40,6 +40,10 @@ loop: break loop } + if p.depth == maxDepth { + continue + } + numPendingSends++ wg.Go(func() { sema <- struct{}{} |
