Skip to content

Windows named pipes hits unreachable code during read operation #1819

Open
@akahan

Description

@akahan

The error occurs at this location:

_ => unreachable!(),

In io.read comes State::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 calling unreachable (and assign the same error state to io.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 and PipeMode::Message modes were tested). After which the client connects to it and sends a message 2 times per second and reads the response.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions