MCPcopy Create free account
hub / github.com/imroc/req / readLoop

Method readLoop

internal/http2/transport.go:2249–2258  ·  view source on GitHub ↗

readLoop runs in its own goroutine and reads and dispatches frames.

()

Source from the content-addressed store, hash-verified

2247
2248// readLoop runs in its own goroutine and reads and dispatches frames.
2249func (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.

Callers 1

newClientConnMethod · 0.95

Calls 6

cleanupMethod · 0.95
runMethod · 0.95
LockMethod · 0.80
WriteGoAwayMethod · 0.80
UnlockMethod · 0.80
ErrCodeTypeAlias · 0.70

Tested by

no test coverage detected