-
Notifications
You must be signed in to change notification settings - Fork 18.8k
Open
Labels
LibraryProposalIssues describing a requested change to the Go standard library or x/ libraries, but not to a toolIssues describing a requested change to the Go standard library or x/ libraries, but not to a toolProposalProposal-CryptoProposal related to crypto packages or other security issuesProposal related to crypto packages or other security issues
Milestone
Description
Proposal Details
In many cases, servers don't wait for TLS closeNotify from the client. For example, both MySQL and PostgreSQL will sometime drop the connection the moment appropriate "disconnect" command is received, without waiting for further comms from the client (this is a deliberate implementation choice, given that all the messages are length prefixed and such).
Right now, failure to "closeNotify" is a free form error:
Line 1443 in f15cd63
| alertErr = fmt.Errorf("tls: failed to send closeNotify alert (but connection was closed anyway): %w", err) |
It will be substantially safer to make it a named error type, so in cases where client knows, that server can drop the connection, it can be easily suppressed with errors.Is without relying on unsafe string matching.
yo-l1982
Metadata
Metadata
Assignees
Labels
LibraryProposalIssues describing a requested change to the Go standard library or x/ libraries, but not to a toolIssues describing a requested change to the Go standard library or x/ libraries, but not to a toolProposalProposal-CryptoProposal related to crypto packages or other security issuesProposal related to crypto packages or other security issues