Skip to content

Dial and Accept should return a context that will be cancelled when the connection is closed #79

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

Closed
nhooyr opened this issue Apr 29, 2019 · 3 comments
Milestone

Comments

@nhooyr
Copy link
Contributor

nhooyr commented Apr 29, 2019

Just like net/http

@nhooyr nhooyr added this to the v0.3.0 milestone Apr 29, 2019
@nhooyr
Copy link
Contributor Author

nhooyr commented Apr 29, 2019

Not sure what the API should look like. Definitely need to look at the net/http thread in golang-nuts to make sure I do this correctly.

@nhooyr
Copy link
Contributor Author

nhooyr commented Apr 29, 2019

This does mean #73 can't remove the read loop as we need it to cancel the context if the client goes away.

@nhooyr
Copy link
Contributor Author

nhooyr commented May 17, 2019

So the plan is to keep the read goroutine, remove the write goroutine in favour of a goroutine that times the write out.

@nhooyr nhooyr mentioned this issue May 17, 2019
@nhooyr nhooyr closed this as completed in 4b724ae May 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant