MCPcopy
hub / github.com/CodisLabs/codis / delayBeforeRetry

Method delayBeforeRetry

pkg/proxy/backend.go:309–326  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

307}
308
309func (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
328func (bc *BackendConn) loopWriter(round int) (err error) {
329 defer func() {

Callers 1

runMethod · 0.95

Calls 3

setResponseMethod · 0.95
IsFalseMethod · 0.80
AfterMethod · 0.65

Tested by

no test coverage detected