Repository navigation
Commit 14a6c83
fix(sdk,core): prevent unrecoverable "Failed to fetch" on long sessions
The SDK client disabled request timeouts entirely (`req.timeout = false`),
causing fetch to hang forever when the Go backend becomes unresponsive.
Combined with only 3 retry attempts at 10s max delay, the renderer's
fetchMessages call would permanently fail with TypeError: Failed to fetch,
freezing the TUI display while the backend continued working in the background.
Changes:
- Set SDK fetch timeout to 5 minutes (300_000ms) instead of disabled
- Increase retry defaults: 5 attempts (was 3), 1s initial delay (was 500ms),
30s max delay (was 10s) for better transient error recovery
Fixes anomalyco#28702
Co-Authored-By: OpenClaude (GLM-5.1) <[email protected]>1 parent d709420 commit 14a6c83
3 files changed
Lines changed: 11 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
36 | 40 | | |
37 | | - | |
| 41 | + | |
38 | 42 | | |
39 | 43 | | |
40 | 44 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
50 | 54 | | |
51 | | - | |
| 55 | + | |
52 | 56 | | |
53 | 57 | | |
54 | 58 | | |
| |||
0 commit comments