You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (go env)?
macOS 10.14.6 (18G6020)
What did you do?
Call Close() on a tls.Conn
What did you expect to see?
The call to Close() to not block, or documentation on the observed behavior
What did you see instead?
Rarely, Close() hangs indefinitely unless I also set a write deadline on the connection.
It's understandable as the TLS conn tries to send a close alert before closing the connection, but it's not clearly stated in the docs, and I wrongly assumed tls.Conn to have the same behavior as the underlying connection. As far as I can tell tls.Conn is the only type to implement the net.Conn interface in the std library to require a wrote deadline not to let Close block indefinitely. Afaict Read has the same "issue" in that it automagically performs the handshake first, with the aggravating factor that having to set a write deadline not to let Read block is even more unintuitive.
The text was updated successfully, but these errors were encountered:
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?macOS 10.14.6 (18G6020)
What did you do?
Call
Close()
on atls.Conn
What did you expect to see?
The call to
Close()
to not block, or documentation on the observed behaviorWhat did you see instead?
Rarely,
Close()
hangs indefinitely unless I also set a write deadline on the connection.It's understandable as the TLS conn tries to send a close alert before closing the connection, but it's not clearly stated in the docs, and I wrongly assumed
tls.Conn
to have the same behavior as the underlying connection. As far as I can telltls.Conn
is the only type to implement thenet.Conn
interface in the std library to require a wrote deadline not to letClose
block indefinitely. AfaictRead
has the same "issue" in that it automagically performs the handshake first, with the aggravating factor that having to set a write deadline not to letRead
block is even more unintuitive.The text was updated successfully, but these errors were encountered: