diff --git a/pool.go b/pool.go index 67f224a..0b4c04e 100644 --- a/pool.go +++ b/pool.go @@ -84,9 +84,7 @@ func (p *Pool) get(timeout time.Duration) *client { default: } - if p.created < p.max { - p.makeOne() - } + p.makeOne() var deadline <-chan time.Time if timeout >= 0 { @@ -142,10 +140,6 @@ func (p *Pool) replace(c *client) { } func (p *Pool) inc() bool { - if p.created >= p.max { - return false - } - p.mut.Lock() defer p.mut.Unlock()