-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
crypto/tls: export/replace errClosed #41066
Comments
My suggestion is that we consider simply replacing |
Now that we've established net.ErrClosed as the "connection is closing/was closed" error, it does seem like TLS should use it. |
The proposal to use |
Based on the discussion above, this seems like a likely accept. |
No change in consensus, so accepted. |
@rsc Great, thanks! Should I send a CL or wait for someone else to do it? It seems like a small change, but it's still in a crypto package. |
@ainar-g Feel free to send over a CL with this change if you would like! |
Change https://golang.org/cl/256897 mentions this issue: |
Following the discussion in #4373, I propose that the currently unexported error
errClosed
in packagecrypto/tls
be exported. That should simplify error checking for services which use e.g. TCP, TLS, or both types of connection depending on configuration.@ianlancetaylor also proposed that we replace that custom error with
internal/poll.ErrNetClosing
, like it is done in that CL, but I am not sure about that, since that could break current code that only wishes to check the error fromcrypto/tls
and notnet
. On the other hand, checking against one error is obviously easier than checking against two.The text was updated successfully, but these errors were encountered: