Commit 357fbcf
committed
fix: Don't swallow caller cancellation in AsyncRepeatingTask.wait_stopped
wait_stopped awaited the worker with a bare await + except CancelledError, which conflated the worker's expected stop() cancellation with cancellation of the caller itself — a timed/cancelled stop() could swallow the cancel and return as if it completed. Use asyncio.wait({task}) (as join_handle already does): it absorbs the worker's cancellation without re-raising it, while still propagating a cancellation of the caller.1 parent 6631fbc commit 357fbcf
1 file changed
Lines changed: 1 addition & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
228 | 228 | | |
229 | 229 | | |
230 | 230 | | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
| 231 | + | |
235 | 232 | | |
236 | 233 | | |
237 | 234 | | |
| |||
0 commit comments