Skip to content

Disconnect serverConnection in finally block#769

Merged
SimonCropp merged 1 commit intomainfrom
Disconnect-serverConnection-in-finally-block
Mar 24, 2026
Merged

Disconnect serverConnection in finally block#769
SimonCropp merged 1 commit intomainfrom
Disconnect-serverConnection-in-finally-block

Conversation

@SimonCropp
Copy link
Copy Markdown
Member

Wrap Server creation and BuildContent call in a try/finally so serverConnection.Disconnect() is always invoked. This ensures the SQL Server connection is closed even if BuildContent throws, preventing potential connection leaks.

Wrap Server creation and BuildContent call in a try/finally so serverConnection.Disconnect() is always invoked. This ensures the SQL Server connection is closed even if BuildContent throws, preventing potential connection leaks.
@SimonCropp SimonCropp added this to the 12.0.1 milestone Mar 24, 2026
@SimonCropp SimonCropp merged commit 3e20185 into main Mar 24, 2026
6 of 7 checks passed
@SimonCropp SimonCropp deleted the Disconnect-serverConnection-in-finally-block branch March 24, 2026 00:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant