mediocregopher / radix.v2

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

No update the pools map when you create a new pool, it is a bug? #10

Closed davidwudv closed 8 years ago

davidwudv commented 8 years ago

hello, I am using your project and have a question, in cluster.(c *Cluster).getconn(key, addr string) function, when you creat a new pool, but miss :

c.pools[addr] = p

It is a bug?

mediocregopher commented 8 years ago

thanks for submitting the issue! From a brief glance at the code I think you may be right, this is likely a bug, albeit one not likely to happen often, but definitely something which needs to be taken care of. Not that it matters too much, but would you be able to tell me how you ran into this at all?

davidwudv commented 8 years ago

@mediocregopher thanks for your reply. I didn't run into this, I just found it when I review this code, and I think logically should update the pools map.

mediocregopher commented 8 years ago

Hopefully that takes care of it, thanks for looking through the code, please feel free to let me know of any other issues you see!

davidwudv commented 8 years ago

OK