Skip to content

fix: prevent connection leak to pool on context cancellation during BeginTx - #17

Open
Kasuki354 wants to merge 1 commit into
raimeecas:mainfrom
Kasuki354:fix/connection-leak-begintx
Open

fix: prevent connection leak to pool on context cancellation during BeginTx#17
Kasuki354 wants to merge 1 commit into
raimeecas:mainfrom
Kasuki354:fix/connection-leak-begintx

Conversation

@Kasuki354

Copy link
Copy Markdown

Wraps BeginTx with context cancellation handling. On cancellation, waits for goroutine, rolls back partial transaction, returns connection to pool.

/claim #2

…eginTx

When context is cancelled during BeginTx(), the connection may leak to
the pool. This fix wraps BeginTx with proper context cancellation handling:
on cancellation, waits for the goroutine to finish, then rolls back any
partially created transaction to return the connection to the pool.

Resolves raimeecas#2
@opirebot

opirebot Bot commented Aug 7, 2026

Copy link
Copy Markdown

😅 Unfortunately there are no rewards left to claim in this issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant