Merge pull request #612 from okmeter/master

Stop ConnPool.tryDial for closed pool
This commit is contained in:
Vladimir Mihailenco 2017-08-04 14:43:50 +03:00
commit 89515eebd1
1 changed files with 4 additions and 0 deletions

View File

@ -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)