MCPcopy Index your code
hub / github.com/CodisLabs/codis / Retain

Method Retain

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

Source from the content-addressed store, hash-verified

436}
437
438func (s *sharedBackendConn) Retain() *sharedBackendConn {
439 if s == nil {
440 return nil
441 }
442 if s.refcnt <= 0 {
443 log.Panicf("shared backend conn has been closed")
444 } else {
445 s.refcnt++
446 }
447 return s
448}
449
450func (s *sharedBackendConn) KeepAlive() {
451 if s == nil {

Callers 2

fillSlotMethod · 0.45
RetainMethod · 0.45

Calls 1

PanicfMethod · 0.80

Tested by

no test coverage detected