countReadFrameError calls Transport.CountError with a string representing err.
(err error)
| 2320 | // countReadFrameError calls Transport.CountError with a string |
| 2321 | // representing err. |
| 2322 | func (cc *ClientConn) countReadFrameError(err error) { |
| 2323 | f := cc.t.CountError |
| 2324 | if f == nil || err == nil { |
| 2325 | return |
| 2326 | } |
| 2327 | if ce, ok := err.(ConnectionError); ok { |
| 2328 | errCode := ErrCode(ce) |
| 2329 | f(fmt.Sprintf("read_frame_conn_error_%s", errCode.stringToken())) |
| 2330 | return |
| 2331 | } |
| 2332 | if errors.Is(err, io.EOF) { |
| 2333 | f("read_frame_eof") |
| 2334 | return |
| 2335 | } |
| 2336 | if errors.Is(err, io.ErrUnexpectedEOF) { |
| 2337 | f("read_frame_unexpected_eof") |
| 2338 | return |
| 2339 | } |
| 2340 | if errors.Is(err, errFrameTooLarge) { |
| 2341 | f("read_frame_too_large") |
| 2342 | return |
| 2343 | } |
| 2344 | f("read_frame_other") |
| 2345 | } |
| 2346 | |
| 2347 | func (rl *clientConnReadLoop) run() error { |
| 2348 | cc := rl.cc |
no test coverage detected