-
Notifications
You must be signed in to change notification settings - Fork 739
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Windows named pipes hits unreachable code during read operation #1819
Comments
last version 1.0.1 |
Even if it's a similar bug #1660. In any case, it is not fixed. |
I can not understand. If |
Here https://github.com/akahan/mio/tree/v1.0.1-dev is the code that I used to temporarily solve this problem. |
I'm getting constant crashes in my application due to this, could akahan's fix be applied as it is? I've read the code but it's quite convoluted, I don't see why the |
@sergioabreu-g a pull request for this would be welcome. |
I can make a PR with that change but I don't know what the consequences might be. I don't have enough knowledge of the codebase to understand why that error is there or how it should be handled. |
The error occurs at this location:
mio/src/sys/windows/named_pipe.rs
Line 871 in 4a5114e
In
io.read
comesState::Err
with:Err The pipe has been ended. (os error 109)
This appears on both Windows 11 and Windows 10.
It reproduced almost stably when closing the laptop lid with running service and client, apparently after switching to standby mode.
If I handle this state and simply exit the
read_done
method without callingunreachable
(and assign the same error state toio.read
again. Perhaps it's better not to do this?), everything continues to work, seemingly normal. Any comments guys?My environment works like this:
The Windows service creates a named pipe as an administrator (both
PipeMode::Bytes
andPipeMode::Message
modes were tested). After which the client connects to it and sends a message 2 times per second and reads the response.The text was updated successfully, but these errors were encountered: