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

Method Remove

internal/pool/pool_sticky.go:116–124  ·  view source on GitHub ↗
(ctx context.Context, cn *Conn, reason error)

Source from the content-addressed store, hash-verified

114}
115
116func (p *StickyConnPool) Remove(ctx context.Context, cn *Conn, reason error) {
117 defer func() {
118 if recover() != nil {
119 p.pool.Remove(ctx, cn, ErrClosed)
120 }
121 }()
122 p._badConnError.Store(BadConnError{wrapped: reason})
123 p.ch <- cn
124}
125
126// RemoveWithoutTurn has the same behavior as Remove for StickyConnPool
127// since StickyConnPool doesn't use a turn-based queue system.

Callers 1

RemoveWithoutTurnMethod · 0.95

Calls 1

RemoveMethod · 0.65

Tested by

no test coverage detected