diff options
| author | demo <demo@antix1> | 2026-05-27 12:39:06 -0400 |
|---|---|---|
| committer | demo <demo@antix1> | 2026-05-27 12:39:56 -0400 |
| commit | 29bc8d424f865f6c9187ccda510b0ad91ee228b7 (patch) | |
| tree | 6d798a0c19a9f133ff6713188773346e183b2abd | |
| parent | a939f6c8ea4e7d493aa282403e1f39a12604484d (diff) | |
fix: make select statement block unless communication takes place
| -rw-r--r-- | classic.go | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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: } }) } |
