Merge pull request #745 from un000/master

Properly close a pool on "not lazy" connect
pull/750/head
Jack Christensen 2020-05-13 12:01:59 -05:00 committed by GitHub
commit c65fd8e2df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -189,7 +189,7 @@ func ConnectConfig(ctx context.Context, config *Config) (*Pool, error) {
// Initially establish one connection // Initially establish one connection
res, err := p.p.Acquire(ctx) res, err := p.p.Acquire(ctx)
if err != nil { if err != nil {
p.p.Close() p.Close()
return nil, err return nil, err
} }
res.Release() res.Release()