Commit 6be4fd2
committed
Skip error recovery on intentional cancellation (#477)
When SlidingWindowAsrManager is cancelled, CancellationError propagates
through processWindow() and the audio buffer loop. Previously this
triggered attemptErrorRecovery() which resets the decoder and, as a
last resort, re-downloads models — neither of which is appropriate for
an intentional shutdown.
Guard both catch sites with `error is CancellationError || Task.isCancelled`
to return immediately instead.
Fixes #477
https://claude.ai/code/session_01696MyMtoiM6T8ruCdCCHab1 parent 6c40eca commit 6be4fd2
File tree
1 file changed
+6
-0
lines changed- Sources/FluidAudio/ASR/Parakeet/SlidingWindow
1 file changed
+6
-0
lines changedLines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
159 | 159 | | |
160 | 160 | | |
161 | 161 | | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
162 | 165 | | |
163 | 166 | | |
164 | 167 | | |
| |||
470 | 473 | | |
471 | 474 | | |
472 | 475 | | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
473 | 479 | | |
474 | 480 | | |
475 | 481 | | |
| |||
0 commit comments