Noobed the deadlock

This commit is contained in:
Asim 2016-05-13 18:24:01 +01:00
parent 2e9f4271a8
commit 98f295b6b0

View File

@ -63,6 +63,7 @@ func (p *pool) release(addr string, conn *poolConn, err error) {
p.Lock()
conns := p.conns[addr]
if len(conns) >= maxIdleConn {
p.Unlock()
conn.Client.Close()
return
}