Skip to content

Commit

Permalink
* Fixed connections pool leak on failed ydb.Open call
Browse files Browse the repository at this point in the history
  • Loading branch information
asmyasnikov committed Sep 16, 2024
1 parent a827ded commit 38730a3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
* Fixed connections pool leak on failed `ydb.Open` call

## v3.80.4
* Fixed panic on usage metrics package from prometheus adapter on `trace.Driver.OnNewStream` callback

Expand Down
2 changes: 2 additions & 0 deletions driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,8 @@ func Open(ctx context.Context, dsn string, opts ...Option) (_ *Driver, _ error)
}()

if err = d.connect(ctx); err != nil {
d.pool.Release(ctx)

Check failure on line 277 in driver.go

View workflow job for this annotation

GitHub Actions / golangci-lint

Error return value of `d.pool.Release` is not checked (errcheck)

return nil, xerrors.WithStackTrace(err)
}

Expand Down

0 comments on commit 38730a3

Please sign in to comment.