Commit 0ddd607
fix(#446605, #442484): broaden shutdown TaskCanceledException guard to cover CancellationToken.None
The previous guard checked oce.CancellationToken.IsCancellationRequested, but the Azure
ServiceBus SDK raises ProcessErrorAsync with a TaskCanceledException whose CancellationToken
is CancellationToken.None during processor shutdown — so IsCancellationRequested is always
false and the guard never fired. Widening to any OperationCanceledException is safe because
genuine transport errors are ServiceBusException, not OperationCanceledException.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent de4367d commit 0ddd607
2 files changed
Lines changed: 30 additions & 6 deletions
File tree
- src/Ev.ServiceBus/Management/Wrappers
- tests/Ev.ServiceBus.UnitTests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
135 | | - | |
| 135 | + | |
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
40 | | - | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
41 | 65 | | |
42 | 66 | | |
43 | | - | |
| 67 | + | |
44 | 68 | | |
45 | 69 | | |
46 | 70 | | |
47 | | - | |
| 71 | + | |
48 | 72 | | |
49 | 73 | | |
50 | 74 | | |
| |||
0 commit comments