Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
kozlovic opened this issue Mar 22, 2021 · 1 comment
Open

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

kozlovic opened this issue Mar 22, 2021 · 1 comment
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@kozlovic
Copy link

kozlovic commented Mar 22, 2021

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)

@mdlayher mdlayher changed the title TLS Connection Close() should not override user's write deadline crypto/tls: Conn.Close should not override user's write deadline Mar 22, 2021
@networkimprov
Copy link

networkimprov commented Mar 22, 2021

cc @ianlancetaylor as possible proposal (adding a field in tls.Config)

cc @FiloSottile @katiehockman

@cagedmantis cagedmantis added this to the Backlog milestone Mar 22, 2021
@cagedmantis cagedmantis added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Mar 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

3 participants