dicej opened issue #7413:
While implementing a test for outbound request body streaming (https://github.com/bytecodealliance/wasmtime/pull/7412), I discovered that dropping the
incoming-response
object would cause the request connection to be closed, even if I still had open handles to the request body and stream.For example, if I insert
drop(response);
to https://github.com/dicej/wasmtime/blob/1782a165754a2dd62f45cbc670603cc85477323b/crates/test-programs/src/bin/api_proxy_streaming.rs#L129, the test will fail with no (or few) bytes copied. The behavior I expected was that the test would pass (i.e. all bytes would be copied) regardless of whether the response handle was dropped or not.
pchickey commented on issue #7413:
The worker task that manages the connection lives here: https://github.com/bytecodealliance/wasmtime/blob/main/crates/wasi-http/src/types.rs#L264 It looks like we need to hold an Arc to it both there and in the HostIncomingBody.
pchickey assigned issue #7413 to elliottt.
pchickey closed issue #7413:
While implementing a test for outbound request body streaming (https://github.com/bytecodealliance/wasmtime/pull/7412), I discovered that dropping the
incoming-response
object would cause the request connection to be closed, even if I still had open handles to the request body and stream.For example, if I insert
drop(response);
to https://github.com/dicej/wasmtime/blob/1782a165754a2dd62f45cbc670603cc85477323b/crates/test-programs/src/bin/api_proxy_streaming.rs#L129, the test will fail with no (or few) bytes copied. The behavior I expected was that the test would pass (i.e. all bytes would be copied) regardless of whether the response handle was dropped or not.
Last updated: Dec 23 2024 at 12:05 UTC