Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/endpoint/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -757,6 +757,7 @@ impl ContextInternal {

let out = inner_lock.vm.take_output();
if let TakeOutputResult::Buffer(b) = out
&& !b.is_empty()
&& !inner_lock.write.send(b)
{
// Nothing we can do anymore here
Expand Down
6 changes: 5 additions & 1 deletion src/endpoint/futures/async_result_poll.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,11 @@ impl Future for VmAsyncResultPollFuture {
let out = inner_lock.vm.take_output();
match out {
TakeOutputResult::Buffer(b) => {
if !inner_lock.write.send(b) {
// Skip empty buffers: take_output returns an empty buffer when there's
// nothing to send (e.g. while replaying completed entries). Sending it
// would emit an empty HTTP/2 DATA frame per replayed await, which some
// proxies (e.g. Envoy) reject when consecutive. See sdk-rust#114.
if !b.is_empty() && !inner_lock.write.send(b) {
return Poll::Ready(Err(ErrorInner::Suspended));
}
}
Expand Down
6 changes: 5 additions & 1 deletion src/endpoint/futures/select_poll.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,11 @@ impl Future for VmSelectAsyncResultPollFuture {
let out = inner_lock.vm.take_output();
match out {
TakeOutputResult::Buffer(b) => {
if !inner_lock.write.send(b) {
// Skip empty buffers: take_output returns an empty buffer when there's
// nothing to send (e.g. while replaying completed entries). Sending it
// would emit an empty HTTP/2 DATA frame per replayed await, which some
// proxies (e.g. Envoy) reject when consecutive. See sdk-rust#114.
if !b.is_empty() && !inner_lock.write.send(b) {
return Poll::Ready(Err(ErrorInner::Suspended));
}
}
Expand Down
Loading