summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--workers.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/workers.go b/workers.go
index f5e1329..966f330 100644
--- a/workers.go
+++ b/workers.go
@@ -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 }()
}