A net.Error where Temporary() => false or a non-net.Error.
What did you see instead?
An net.Error where Temporary() => true.
This is technically documented behavior After a Write has timed out, the TLS state is corrupt and all future writes will return the same error. But it means that code that works generically with the net.Conn interface cannot rely on temporary errors being (potentially) temporary. It must treat them as permanent.
Perhaps the original failed tls.Conn.Write could return a non-temporary error.
The text was updated successfully, but these errors were encountered:
With TLS connections a Write timeout caused by a SetDeadline permanently
breaks the connection. However, the errors are reported as temporary. So
there is no way to determine if it really is recoverable. As these were
the only kind of Write error that was recovered all Write errors are now
fatal to the connection.