Skip to content

Commit 3adc8ad

Browse files
committed
fix context which is used for closing session
1 parent e827ec1 commit 3adc8ad

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
* Fixed connections pool leak on closing sessions
2+
13
## v3.95.3
24
* Supported of `database/sql/driver.Valuer` interfaces for params which passed to query using sql driver
35
* Exposed `credentials/credentials.OAuth2Config` OAuth2 config

internal/pool/pool.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ func makeAsyncCloseItemFunc[PT ItemConstraint[T], T any](
302302
defer closeItemCancel()
303303

304304
if d := p.config.closeTimeout; d > 0 {
305-
closeItemCtx, closeItemCancel = xcontext.WithTimeout(ctx, d)
305+
closeItemCtx, closeItemCancel = xcontext.WithTimeout(closeItemCtx, d)
306306
defer closeItemCancel()
307307
}
308308

0 commit comments

Comments
 (0)