diff options
Diffstat (limited to 'workers.go')
| -rw-r--r-- | workers.go | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -31,12 +31,12 @@ func workers(startURL url.URL, maxConcurrency, maxURLs int) { // the urls channel (unseen links.) for i := range maxConcurrency { wg.Go(func() { - loop: for u := range urls { batch := getBatch(u) select { case <-ctx.Done(): - break loop + fmt.Printf("exiting early %d\n", i+1) + return default: go func() { worklist <- batch }() } |
