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

Improve Close UX #78

Closed
nhooyr opened this issue Apr 29, 2019 · 3 comments · Fixed by #81
Closed

Improve Close UX #78

nhooyr opened this issue Apr 29, 2019 · 3 comments · Fixed by #81

Comments

@nhooyr
Copy link
Owner

nhooyr commented Apr 29, 2019

https://www.reddit.com/r/golang/comments/bi2tan/nhooyrwebsocket_a_minimal_and_idiomatic_websocket/em1jn6d/?context=3

The close only happens for the first call.

Also, instead of returning an error when the close code/reason are invalid, we should just print to stderr like net/http as no one will ever check Close's error, in normal usage anyway.

@nhooyr
Copy link
Owner Author

nhooyr commented Apr 29, 2019

Should also mention that it unblocks every goroutine interacting with the connection..

@nhooyr
Copy link
Owner Author

nhooyr commented Apr 29, 2019

And the size limit on reason.

@nhooyr
Copy link
Owner Author

nhooyr commented Apr 29, 2019

Should mention that reason should never be used to send dynamic messages as they might become too big.

nhooyr added a commit that referenced this issue May 17, 2019
@nhooyr nhooyr mentioned this issue May 17, 2019
nhooyr added a commit that referenced this issue May 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant