forked from mirror/redis
stop ConnPool.tryDial goroutine if pool was closed
This commit is contained in:
parent
a8ee44122a
commit
7ae26b74bc
|
@ -119,6 +119,9 @@ func (p *ConnPool) NewConn() (*Conn, error) {
|
|||
|
||||
func (p *ConnPool) tryDial() {
|
||||
for {
|
||||
if p.closed() {
|
||||
return
|
||||
}
|
||||
conn, err := p.opt.Dialer()
|
||||
if err != nil {
|
||||
p.setLastDialError(err)
|
||||
|
|
Loading…
Reference in New Issue