mediocregopher / radix.v2

Redis client for Go
http://godoc.org/github.com/mediocregopher/radix.v2
MIT License
433 stars 92 forks source link

Why put closed connection into the pool in NewCustom #54

Closed chrislee87 closed 7 years ago

chrislee87 commented 7 years ago

When err occurs, redis-client is closed, why still put those clients into the pool **if err != nil { for , client = range pool { client.Close() } pool = pool[0:] break } Is that you want to return an empty pool, should the code be as below pool = pool[:0]**_

mediocregopher commented 7 years ago

Great catch, thanks!