Commit 0495310
committed
fix: handle unbound response_or_error in send_request timeout
Initialize response_or_error to None before the try block and add an
explicit None check after. This prevents an UnboundLocalError when
anyio's fail_after cancel scope suppresses the timeout exception at
the exact deadline boundary without raising, leaving the variable
unassigned (see agronholm/anyio#589).
Github-Issue: #1717
Reported-by: maxisbey1 parent 883d893 commit 0495310
File tree
1 file changed
+10
-0
lines changed1 file changed
+10
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
270 | 270 | | |
271 | 271 | | |
272 | 272 | | |
| 273 | + | |
273 | 274 | | |
274 | 275 | | |
275 | 276 | | |
| |||
278 | 279 | | |
279 | 280 | | |
280 | 281 | | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
281 | 291 | | |
282 | 292 | | |
283 | 293 | | |
| |||
0 commit comments