mirror of
https://github.com/jackc/pgx.git
synced 2025-05-31 11:42:24 +00:00
Merge pull request #745 from un000/master
Properly close a pool on "not lazy" connect
This commit is contained in:
commit
c65fd8e2df
@ -189,7 +189,7 @@ func ConnectConfig(ctx context.Context, config *Config) (*Pool, error) {
|
||||
// Initially establish one connection
|
||||
res, err := p.p.Acquire(ctx)
|
||||
if err != nil {
|
||||
p.p.Close()
|
||||
p.Close()
|
||||
return nil, err
|
||||
}
|
||||
res.Release()
|
||||
|
Loading…
x
Reference in New Issue
Block a user