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

Method freeConn

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

Source from the content-addressed store, hash-verified

106}
107
108func (p *StickyConnPool) freeConn(ctx context.Context, cn *Conn) {
109 if err := p.badConnError(); err != nil {
110 p.pool.Remove(ctx, cn, err)
111 } else {
112 p.pool.Put(ctx, cn)
113 }
114}
115
116func (p *StickyConnPool) Remove(ctx context.Context, cn *Conn, reason error) {
117 defer func() {

Callers 2

PutMethod · 0.95
CloseMethod · 0.95

Calls 3

badConnErrorMethod · 0.95
RemoveMethod · 0.65
PutMethod · 0.65

Tested by

no test coverage detected