2
0

Properly close a pool on "not lazy" connect

This commit is contained in:
Yegor Myskin
2020-05-13 17:48:28 +03:00
parent 64789acf46
commit 8dd3679f5a
+1 -1
View File
@@ -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()