Skip to content
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

broken pipe returned when reading half closed stream #28

Open
SyuTingSong opened this issue Feb 11, 2018 · 3 comments
Open

broken pipe returned when reading half closed stream #28

SyuTingSong opened this issue Feb 11, 2018 · 3 comments

Comments

@SyuTingSong
Copy link

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?

@cs8425
Copy link

cs8425 commented Mar 9, 2019

Maybe you can take a look of my branch : https://github.com/cs8425/smux/tree/implement-half-close
I implement half-close feature but not fully tested if there were data racing.

@dotqi
Copy link

dotqi commented Mar 13, 2019

也许你可以看看我的分支:https//github.com/cs8425/smux/tree/implement-half-close
我实现半关闭功能,但如果有数据竞争则没有完全测试。

你都改写了什么功能?最近也在用这个包,发现有Read Stream Error broken pipe 错误,不知道如何发生的。

@cs8425
Copy link

cs8425 commented Mar 13, 2019

@dotqi
Read Stream回傳broken pipe的原因有很多
有正常的被close也有因為缺陷造成的不正常close
麻煩給更詳細資料
最好是簡單的demo code可以複現問題
至於我改了什麼功能請到PR #47 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants