summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--classic.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/classic.go b/classic.go
index 14bb888..653f8f8 100644
--- a/classic.go
+++ b/classic.go
@@ -55,13 +55,13 @@ loop:
sema <- struct{}{}
defer func() { <-sema }()
+ batch := getBatch(p.url)
+ ps := convertToPackets(batch, p.depth+1)
+
select {
case <-ctx.Done():
return
- default:
- batch := getBatch(p.url)
- ps := convertToPackets(batch, p.depth+1)
- worklist <- ps
+ case worklist <- ps:
}
})
}