Skip to content

crypto/tls: Conn.Close should not override user's write deadline #45162

@kozlovic

Description

@kozlovic

What version of Go are you using (go version)?

$ go version
go version go1.16.2 darwin/amd64

Does this issue reproduce with the latest release?

Yes:

c.SetWriteDeadline(time.Now().Add(time.Second * 5))

What operating system and processor architecture are you using (go env)?

All

What did you do?

Set a write deadline of my liking, close a TLS connection.

What did you expect to see?

The close to block for only the user specified deadline.

What did you see instead?

The close blocks for 5 seconds.

The library should not override the user write deadline, or add a field in tls.Config. See comments on existing issue: #31224 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions