readLoop runs in its own goroutine and reads and dispatches frames.
()
| 2247 | |
| 2248 | // readLoop runs in its own goroutine and reads and dispatches frames. |
| 2249 | func (cc *ClientConn) readLoop() { |
| 2250 | rl := &clientConnReadLoop{cc: cc} |
| 2251 | defer rl.cleanup() |
| 2252 | cc.readerErr = rl.run() |
| 2253 | if ce, ok := cc.readerErr.(ConnectionError); ok { |
| 2254 | cc.wmu.Lock() |
| 2255 | cc.fr.WriteGoAway(0, ErrCode(ce), nil) |
| 2256 | cc.wmu.Unlock() |
| 2257 | } |
| 2258 | } |
| 2259 | |
| 2260 | // GoAwayError is returned by the Transport when the server closes the |
| 2261 | // TCP connection after sending a GOAWAY frame. |
no test coverage detected