Commit 3eeeb85
committed
fix: change SSE keepalive from event to comment format to unblock client watchdog
Change keepalive ping from SSE event (`event: ping\ndata: ...`) to SSE
comment (`: keepalive\n\n`) across all streaming handlers. SSE comments
keep HTTP connections alive but are not yielded by the Anthropic SDK,
so client-side idle watchdogs (e.g. Claude Code's 90s timeout) continue
counting down correctly when the upstream connection dies silently.1 parent e6e73b4 commit 3eeeb85
4 files changed
Lines changed: 17 additions & 13 deletions
File tree
- backend/internal
- handler
- service
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
134 | | - | |
135 | | - | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
136 | 138 | | |
137 | 139 | | |
138 | 140 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4053 | 4053 | | |
4054 | 4054 | | |
4055 | 4055 | | |
4056 | | - | |
4057 | | - | |
4058 | | - | |
| 4056 | + | |
| 4057 | + | |
| 4058 | + | |
4059 | 4059 | | |
4060 | 4060 | | |
4061 | 4061 | | |
| |||
4457 | 4457 | | |
4458 | 4458 | | |
4459 | 4459 | | |
4460 | | - | |
4461 | | - | |
4462 | | - | |
| 4460 | + | |
| 4461 | + | |
| 4462 | + | |
4463 | 4463 | | |
4464 | 4464 | | |
4465 | 4465 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6939 | 6939 | | |
6940 | 6940 | | |
6941 | 6941 | | |
6942 | | - | |
6943 | | - | |
6944 | | - | |
| 6942 | + | |
| 6943 | + | |
| 6944 | + | |
| 6945 | + | |
6945 | 6946 | | |
6946 | 6947 | | |
6947 | 6948 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
552 | 552 | | |
553 | 553 | | |
554 | 554 | | |
555 | | - | |
556 | | - | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
557 | 558 | | |
558 | 559 | | |
559 | 560 | | |
| |||
0 commit comments