MCPcopy
hub / github.com/redis/go-redis / Put

Method Put

internal/pool/pool_sticky.go:99–106  ·  view source on GitHub ↗
(ctx context.Context, cn *Conn)

Source from the content-addressed store, hash-verified

97}
98
99func (p *StickyConnPool) Put(ctx context.Context, cn *Conn) {
100 defer func() {
101 if recover() != nil {
102 p.freeConn(ctx, cn)
103 }
104 }()
105 p.ch <- cn
106}
107
108func (p *StickyConnPool) freeConn(ctx context.Context, cn *Conn) {
109 if err := p.badConnError(); err != nil {

Callers

nothing calls this directly

Calls 1

freeConnMethod · 0.95

Tested by

no test coverage detected