Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmd/thanos/receive: avoid deadlock (#1727)
While debugging #1721, I found that when thanos receive bails, there is a race in a select statement, where the non-returning branch may be chosen. This branch will deadlock if selected twice because the channel reader has already exited. The way to prevent this is by checking if we need to exit on every loop. Signed-off-by: Lucas Servén Marín <[email protected]>
- Loading branch information