Fix Wait draining events from concurrent consumers Wait() was ranging over the public Events channel, competing with any concurrent reader for events. Callers that streamed events in one goroutine and called Wait() in another would lose an arbitrary subset of events. Wait now only blocks on the done channel; the result fields are already visible thanks to the close ordering (set fields → close events → close done). Signed-off-by: Bryan Frimin <bryan@getprobo.com>
3.0 KiB
3.0 KiB