MCPcopy Create free account
hub / github.com/CodisLabs/codis / isRecyclable

Method isRecyclable

pkg/utils/redis/client.go:330–335  ·  view source on GitHub ↗
(c *Client)

Source from the content-addressed store, hash-verified

328}
329
330func (p *Pool) isRecyclable(c *Client) bool {
331 if c.conn.Err() != nil {
332 return false
333 }
334 return p.timeout == 0 || time.Since(c.LastUse) < p.timeout
335}
336
337func (p *Pool) Close() error {
338 p.mu.Lock()

Callers 3

CleanupMethod · 0.95
getClientFromCacheMethod · 0.95
PutClientMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected