()
| 307 | } |
| 308 | |
| 309 | func (bc *BackendConn) delayBeforeRetry() { |
| 310 | bc.retry.fails += 1 |
| 311 | if bc.retry.fails <= 10 { |
| 312 | return |
| 313 | } |
| 314 | timeout := bc.retry.delay.After() |
| 315 | for bc.closed.IsFalse() { |
| 316 | select { |
| 317 | case <-timeout: |
| 318 | return |
| 319 | case r, ok := <-bc.input: |
| 320 | if !ok { |
| 321 | return |
| 322 | } |
| 323 | bc.setResponse(r, nil, ErrBackendConnReset) |
| 324 | } |
| 325 | } |
| 326 | } |
| 327 | |
| 328 | func (bc *BackendConn) loopWriter(round int) (err error) { |
| 329 | defer func() { |
no test coverage detected