Commit 845fe1b
fix: skip empty output buffers to avoid empty HTTP/2 DATA frames
take_output returns an empty buffer when there is nothing to send but
the output stream is not closed (e.g. while replaying already-completed
entries on resume-after-suspend). The SDK forwarded this empty buffer to
the response channel unconditionally, emitting one empty HTTP/2 DATA
frame per replayed await. Proxies such as Envoy terminate connections
with more than one consecutive empty-payload frame, so suspended
invocations never resumed.
Guard the three send sites (async_result_poll, select_poll,
consume_to_end) to skip empty buffers. The EOF arm is unchanged, so a
closed output still maps to UnexpectedOutputClosed.
Fixes #114
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 4e937e8 commit 845fe1b
3 files changed
Lines changed: 11 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
757 | 757 | | |
758 | 758 | | |
759 | 759 | | |
| 760 | + | |
760 | 761 | | |
761 | 762 | | |
762 | 763 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
63 | 67 | | |
64 | 68 | | |
65 | 69 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
64 | 68 | | |
65 | 69 | | |
66 | 70 | | |
| |||
0 commit comments