ErrTimeout should be temporary, just like the standard packages in Golang.
// Read header, payload.
if err := c.readFromUntil(c.conn, recordHeaderLen); err != nil {
// RFC 8446, Section 6.1 suggests that EOF without an alertCloseNotify
// is an error, but popular web sites seem to do this, so we accept it
// if and only if at the record boundary.
if err == io.ErrUnexpectedEOF && c.rawInput.Len() == 0 {
err = io.EOF
}
if e, ok := err.(net.Error); !ok || !e.Temporary() {
c.in.setErrorLocked(err)
}
return err
}
When we use tls.Conn to wrap yamux.Stream, if a read deadline occurs, it will cause subsequent read operations to fail continuously because e.Temporary() returns false, indicating a permanent error.
ErrTimeout
should be temporary, just like the standard packages in Golang.When we use tls.Conn to wrap yamux.Stream, if a read deadline occurs, it will cause subsequent read operations to fail continuously because
e.Temporary()
returns false, indicating a permanent error.@jefferai @dadgar PTAL