mirror of https://github.com/go-redis/redis.git
Merge pull request #612 from okmeter/master
Stop ConnPool.tryDial for closed pool
This commit is contained in:
commit
89515eebd1
|
@ -119,6 +119,10 @@ func (p *ConnPool) NewConn() (*Conn, error) {
|
||||||
|
|
||||||
func (p *ConnPool) tryDial() {
|
func (p *ConnPool) tryDial() {
|
||||||
for {
|
for {
|
||||||
|
if p.closed() {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
conn, err := p.opt.Dialer()
|
conn, err := p.opt.Dialer()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
p.setLastDialError(err)
|
p.setLastDialError(err)
|
||||||
|
|
Loading…
Reference in New Issue