Repository navigation
Commit 2ee664c
fix(resilience): clamp negative integer Retry-After + assert sleep count
- _parse_retry_after: clamp the integer branch to max(0.0, ...) matching
the HTTP-date branch. Negative Retry-After values from malformed servers
silently became negative delays passed to asyncio.sleep (which treats
them as 0). Explicit clamp removes the inconsistency.
- test_respect_retry_after_false_ignores_header: add len(sleeper.calls)==1
assertion before indexing, matching the pattern used by test_retries_503.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent a222577 commit 2ee664c
2 files changed
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
385 | 385 | | |
386 | 386 | | |
387 | 387 | | |
| 388 | + | |
388 | 389 | | |
0 commit comments