Skip to content

Commit

Permalink
Merge pull request #1464 from ydb-platform/pool-leak
Browse files Browse the repository at this point in the history
* Fixed connections pool leak on failed `ydb.Open` call
  • Loading branch information
asmyasnikov authored Sep 16, 2024
2 parents a827ded + a4da503 commit 89a10b0
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)

return nil, xerrors.WithStackTrace(err)
}

Expand Down

0 comments on commit 89a10b0

Please sign in to comment.