vavrusa opened PR #12816 from vavrusa:marek/fix-stream-read-after-closed to bytecodealliance:main:
Hi! This is part of an issue I was trying to debug.
After the inner stream returns
0the StreamError::Closed is sent to the channel, and after picking it up in read() the stream is set as closed, and the error is returned to the caller.If the caller however tries to recv() after the socket is closed, AsyncReadStream is going to return empty list and not StreamError::Closed which is ambiguous.
<!--
Please make sure you include the following information:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
vavrusa requested wasmtime-wasi-reviewers for a review on PR #12816.
github-actions[bot] added the label wasi on PR #12816.
alexcrichton commented on PR #12816:
Thanks! Would it be possible to add a test for this too?
Last updated: Mar 23 2026 at 16:19 UTC