Commit b184046
fix: make context cancel unconditional in flush (#15)
The context cancel function was declared and deferred inside a
conditional block. A defer inside a conditional is correct but subtle —
particularly if the closure were later refactored to use named returns,
the cancel call would silently move. Initialize cancel to a no-op func
upfront so the defer is always unconditional and its scope is obvious at
a glance.
Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>1 parent f12dd7c commit b184046
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
221 | 221 | | |
222 | 222 | | |
223 | 223 | | |
| 224 | + | |
224 | 225 | | |
225 | | - | |
226 | 226 | | |
227 | | - | |
228 | 227 | | |
| 228 | + | |
229 | 229 | | |
230 | 230 | | |
231 | 231 | | |
| |||
0 commit comments