fail handles an asynchronous error while reading. If err is non-nil, it is terminal, and subsequent (or pending) Reads will fail. If err wraps ErrSessionMissing, the failure indicates that the session is no longer present on the server, and no final DELETE will be performed when closing the connec
(err error)
| 1737 | // longer present on the server, and no final DELETE will be performed when |
| 1738 | // closing the connection. |
| 1739 | func (c *streamableClientConn) fail(err error) { |
| 1740 | if err != nil { |
| 1741 | c.failOnce.Do(func() { |
| 1742 | c._failure = err |
| 1743 | close(c.failed) |
| 1744 | }) |
| 1745 | } |
| 1746 | } |
| 1747 | |
| 1748 | func (c *streamableClientConn) failure() error { |
| 1749 | select { |
no outgoing calls
no test coverage detected