Commit 5f19fc7
authored
Make
This one's aimed at fixing an intermittently failing tests that we're
occasionally seeing in CI:
https://github.com/riverqueue/river/actions/runs/24312334093/job/70984031771?pr=1203
It was possible for the test case to end to `leaderResignedChan` before
`keepLeadershipLoop` entered its select, which with an unbuffered
channel, could block forever. Changing this to a buffered channel lets
`keepLeadershipLoop` consume the value as its leisure while making sure
the send never blocks.leaderResignedChan buffered to protect against hang (#1205)1 parent 3c62677 commit 5f19fc7
1 file changed
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
139 | | - | |
140 | | - | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
141 | 143 | | |
142 | 144 | | |
143 | 145 | | |
| |||
0 commit comments