Skip to content

Commit

Permalink
fix context which is used for closing session
Browse files Browse the repository at this point in the history
  • Loading branch information
4el0ve4ek committed Dec 21, 2024
1 parent e827ec1 commit 3adc8ad
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
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 closing sessions

## v3.95.3
* Supported of `database/sql/driver.Valuer` interfaces for params which passed to query using sql driver
* Exposed `credentials/credentials.OAuth2Config` OAuth2 config
Expand Down
2 changes: 1 addition & 1 deletion internal/pool/pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ func makeAsyncCloseItemFunc[PT ItemConstraint[T], T any](
defer closeItemCancel()

if d := p.config.closeTimeout; d > 0 {
closeItemCtx, closeItemCancel = xcontext.WithTimeout(ctx, d)
closeItemCtx, closeItemCancel = xcontext.WithTimeout(closeItemCtx, d)
defer closeItemCancel()
}

Expand Down

0 comments on commit 3adc8ad

Please sign in to comment.