In multiSource, if the primary source returned before the secondary source, we would leak the goroutine waiting on results from the secondary source. This was because that goroutine was writing to a channel that no longer had any readers. Fix that by making the channel in getResponse buffered, so getResponse can always write to its channel, regardless of whether there are readers. I've confirmed that the unittest fails when run without the fix. |
||
|---|---|---|
| .. | ||
| responder | ||
| updater | ||