Skip to content

broken pipe returned when reading half closed stream #28

@SyuTingSong

Description

@SyuTingSong

I am using smux.Stream for reading and writing in two concurrency goroutines. After all data written, the stream.Close is called for ending writing.

The method stream.Read running at the local endpoint will get an error broken pipe immediately. Reading at the remote endpoint will get io.EOF as expected. Even I call stream.Close when EOF reached, the local endpoint still get the broken pipe error.

I read the source code of smux. It seems that smux does not support half closing a stream. Any idea to avoid the broken pipe issue?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions