Skip to content

Fix read loop not exiting when the server closes the connection #73

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

Merged
merged 2 commits into from
Feb 12, 2020

Conversation

belak
Copy link
Member

@belak belak commented Jul 15, 2019

This is technically a backwards incompatible change as it updates the Client to require a ReadWriteCloser rather than just a ReadWriter. This makes it possible to force the readLoop to exit.

This builds on PR #72 by @SeanLatimer

@belak
Copy link
Member Author

belak commented Jul 29, 2019

There is another option where we use a net.Conn - this may actually be useful because then we can use SetDeadline properly.

@belak belak force-pushed the seanlatimer-master branch from e2be5bd to 806fddc Compare February 12, 2020 23:02
@belak
Copy link
Member Author

belak commented Feb 12, 2020

I think this is fine for now because it's the least intrusive. I don't know what a better interface would look like, but if we can improve on this in the future I'd like to.

@belak belak merged commit ed17aa9 into master Feb 12, 2020
@belak belak deleted the seanlatimer-master branch February 12, 2020 23:06
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

Successfully merging this pull request may close these issues.

2 participants