mirror of
https://github.com/redis/go-redis.git
synced 2025-07-12 04:01:40 +03:00
stop ConnPool.tryDial goroutine if pool was closed
This commit is contained in:
@ -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)
|
||||
|
Reference in New Issue
Block a user