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

Let Stream.Read() return io.EOF when connection is closed #6

Closed
joesis opened this issue Nov 8, 2016 · 5 comments
Closed

Let Stream.Read() return io.EOF when connection is closed #6

joesis opened this issue Nov 8, 2016 · 5 comments

Comments

@joesis
Copy link
Contributor

joesis commented Nov 8, 2016

It's the standard behavior of connection handling, so the caller can handle gracefully.

Currently, errConnReset is return when cmdRST is seen. The cmdRST flag is sent by the remote end to Close() the stream, which is not an abnormal condition.

@xtaci
Copy link
Owner

xtaci commented Nov 8, 2016

so you think errBrokenPipe should be returned?

@xtaci
Copy link
Owner

xtaci commented Nov 8, 2016

you can test on your branch , and send me PR after that.

@xtaci
Copy link
Owner

xtaci commented Nov 8, 2016

fixed that!

@joesis
Copy link
Contributor Author

joesis commented Nov 8, 2016

Wow it's quick! Thanks @xtaci

@joesis joesis closed this as completed Nov 8, 2016
@xtaci
Copy link
Owner

xtaci commented Nov 8, 2016

feel free to ask any questions.

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

2 participants