You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Platform
Darwin macbook-pro.local 21.6.0 Darwin Kernel Version 21.6.0: Mon Jun 24 00:58:06 PDT 2024; root:xnu-8020.240.18.709.2~1/RELEASE_ARM64_T6000 arm64
Description
SimplexStream (#6589) doesn't close the other half when the ReadHalf or WriteHalf is dropped. This leads to the other half blocking forever waiting for a read/write which will never finish.
The straightforward option would be to have ReadHalf/WriteHalf's inner type be an enum of T & Simplex so it would know how to handle the shutdown. Alternatively, Inner could store some sort of fn pointer or some sort of virtual dispatch strategy as a callback that is invoked when the shutdown happens.
I don't love adding an enum to ReadHalf/WriteHalf since we're stuck with the enum forever if we do that. I guess this is a sort of dupe of #6878. We shouldn't have reused it in the signature for simplex.
Version
SimplexStream was introduced in v1.40.0.
Platform
Darwin macbook-pro.local 21.6.0 Darwin Kernel Version 21.6.0: Mon Jun 24 00:58:06 PDT 2024; root:xnu-8020.240.18.709.2~1/RELEASE_ARM64_T6000 arm64
Description
SimplexStream (#6589) doesn't close the other half when the ReadHalf or WriteHalf is dropped. This leads to the other half blocking forever waiting for a read/write which will never finish.
Playground link
I expected to see this happen: the
write_all
future should resolve to an error.Instead, this happened: the
write_all
future never resolves.This is the same in the other direction as well, where the
read
calls never resolve if the write half is dropped.The text was updated successfully, but these errors were encountered: