Commit e17f61e
out_forward: close connection on failed flush to avoid frame desync
A forward frame is written as multiple non-atomic writes (header, body,
options). When one of them fails, part of the frame may already be on the
socket, so returning the connection to the keepalive pool lets the next
frame be read as the truncated frame's missing piece and desyncs the
receiver's msgpack stream. Force the connection closed on error so the
next flush starts on a fresh connection.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: zshuang0316 <zshuang0316@163.com>1 parent a1e05fc commit e17f61e
1 file changed
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1789 | 1789 | | |
1790 | 1790 | | |
1791 | 1791 | | |
| 1792 | + | |
1792 | 1793 | | |
1793 | 1794 | | |
1794 | 1795 | | |
| |||
1833 | 1834 | | |
1834 | 1835 | | |
1835 | 1836 | | |
| 1837 | + | |
| 1838 | + | |
| 1839 | + | |
| 1840 | + | |
| 1841 | + | |
| 1842 | + | |
| 1843 | + | |
| 1844 | + | |
| 1845 | + | |
| 1846 | + | |
| 1847 | + | |
1836 | 1848 | | |
1837 | 1849 | | |
1838 | 1850 | | |
| |||
0 commit comments