Commit 8a65459
committed
CommandModule: fix horrible bug in cancelation
If your Command implemented Cancelable, then calling cancel(...) from
within the command itself (e.g., from an initializer callback) did not
actually cancel anything, because the wrapping CommandModule instance
did not recognize the cancelation state of its wrapped Command.
Now, the CommandModule always leans on its wrapped Command for all
cancelation-related operations, unless the Command itself does not
implement Cancelable.
Noticed by Richard Domander. Thanks to Mark Hiner for help debugging.1 parent 01547c6 commit 8a65459
1 file changed
+13
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
89 | | - | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
90 | 94 | | |
91 | 95 | | |
92 | 96 | | |
| |||
205 | 209 | | |
206 | 210 | | |
207 | 211 | | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
208 | 215 | | |
209 | 216 | | |
210 | 217 | | |
211 | 218 | | |
212 | 219 | | |
213 | | - | |
214 | 220 | | |
215 | | - | |
216 | 221 | | |
| 222 | + | |
217 | 223 | | |
| 224 | + | |
218 | 225 | | |
219 | 226 | | |
220 | 227 | | |
221 | 228 | | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
222 | 232 | | |
223 | 233 | | |
224 | 234 | | |
| |||
0 commit comments