mirror of
https://github.com/redis/go-redis.git
synced 2025-07-28 06:42:00 +03:00
Add race test for big vals. Copy connection to avoid race with PubSub.
This commit is contained in:
@ -7,6 +7,7 @@ import (
|
||||
"time"
|
||||
|
||||
"gopkg.in/redis.v3/internal/hashtag"
|
||||
"gopkg.in/redis.v3/internal/pool"
|
||||
)
|
||||
|
||||
// ClusterClient is a Redis Cluster client representing a pool of zero
|
||||
@ -80,7 +81,7 @@ func (c *ClusterClient) Close() error {
|
||||
c.clientsMx.Lock()
|
||||
|
||||
if c.closed {
|
||||
return errClosed
|
||||
return pool.ErrClosed
|
||||
}
|
||||
c.closed = true
|
||||
c.resetClients()
|
||||
@ -105,7 +106,7 @@ func (c *ClusterClient) getClient(addr string) (*Client, error) {
|
||||
c.clientsMx.Lock()
|
||||
if c.closed {
|
||||
c.clientsMx.Unlock()
|
||||
return nil, errClosed
|
||||
return nil, pool.ErrClosed
|
||||
}
|
||||
|
||||
client, ok = c.clients[addr]
|
||||
|
Reference in New Issue
Block a user