Following the discussion in #4373, I propose that
the currently unexported error errClosed
in package crypto/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 from crypto/tls
and not net. On the other hand, checking
against one error is obviously easier than checking
against two.
Following the discussion in #4373, I propose that the currently unexported error
errClosedin packagecrypto/tlsbe 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/tlsand notnet. On the other hand, checking against one error is obviously easier than checking against two.