Skip to content

crypto/tls: Conn.Close() does not close connection gracefully  #71172

@gn00616031

Description

@gn00616031

Proposal Details

We use golang:1.21.3 to develop a websocket server, and deploy it on AWS. And we notice that the RST packets sent from server increased than our old server (which is developed in NodeJS). And we trace the code, find crypto/tls/coon.go: Close() may not close connection gracefully

As following screenshot, it send close notify then close connection directly. Then client send close notify to server, it will cause server response RST packet.

截圖 2025-01-08 下午5 25 37

Thus we think that after send close notify, it should wait close notify from other side then close connection. It can prevent RST packet.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.WaitingForInfoIssue is not actionable because of missing required information, which needs to be provided.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions