Skip to content

crypto/tls: export/replace errClosed #41066

@ainar-g

Description

@ainar-g

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions