Files
spray/core
M09IcandClaude Opus 4.6 a319b9b9e2 fix: drain additionCh in Close() to prevent wg.Wait hang after ctx cancel
When ctx is cancelled (e.g. IsFailed threshold), the Run loop breaks
and stops reading additionCh. But doCheck (now via addAddition) may
have queued items with wg.Add(1) that no one consumes. Close().wg.Wait()
hangs forever.

Fix: spawn a drain goroutine in Close() before wg.Wait() that consumes
and Done()s remaining additionCh items, then close the channel after
Wait returns.

Verified: 16 IPs x 2 ports x 1000 words completes with EXIT 0.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
2026-05-19 20:21:25 -07:00
..