mirror of
https://github.com/redis/go-redis.git
synced 2025-04-19 07:22:17 +03:00
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…
x
Reference in New Issue
Block a user