Sitelet https://github.com/npgsql/npgsql/pull/6287
Skip to content

fixes ConnectionReset on secured connection on Windows - #6287

Merged
vonzshik merged 1 commit into
npgsql:mainfrom
trivalik:fixSsl
Nov 5, 2025
Merged

vonzshik merged 1 commit into
npgsql:mainfrom
trivalik:fixSsl

Conversation

@trivalik

@trivalik trivalik commented Nov 3, 2025

Copy link
Copy Markdown
Contributor

fixes #6274

@roji

roji commented Nov 3, 2025 •

Copy link
Copy Markdown
Member

@trivalik this PR seems to be mis-targeted - I assume you wanted to target branch release/8.0.9 (the last version to support .NET Framework). If so, please retarget this PR (edit button).

@trivalik
trivalik changed the base branch from main to hotfix/8.0.9 November 3, 2025 12:28
@trivalik

trivalik commented Nov 3, 2025

Copy link
Copy Markdown
Contributor Author

BTW an appended SSL Mode=Allow had no effect, so not handled.

@vonzshik

vonzshik commented Nov 3, 2025

Copy link
Copy Markdown
Contributor

Instead of doing a workaround .NET Framework, the more correct fix is to not check for PostgresException and instead always retry if it's Prefer or Allow. In addition, this has to be merged first into the main branch and then backported to 9 and 8.

@trivalik
trivalik changed the base branch from hotfix/8.0.9 to main November 3, 2025 20:35
Comment thread src/Npgsql/Internal/NpgsqlConnector.cs Outdated
Comment thread src/Npgsql/Internal/NpgsqlConnector.cs Outdated
@trivalik trivalik changed the title fixes first ConnectionReset for .NET Framework on secured connection fixes ConnectionReset for .NET Framework on secured connection Nov 4, 2025
@trivalik trivalik changed the title fixes ConnectionReset for .NET Framework on secured connection fixes ConnectionReset on secured connection on Windows Nov 4, 2025

@roji roji left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vonzshik leaving to you to review/approve this as you know all this best.

Comment thread src/Npgsql/Internal/NpgsqlConnector.cs Outdated
@vonzshik
vonzshik enabled auto-merge (squash) November 5, 2025 14:05
@vonzshik
vonzshik merged commit ed512e5 into npgsql:main Nov 5, 2025
13 checks passed
vonzshik pushed a commit that referenced this pull request Nov 5, 2025
vonzshik pushed a commit that referenced this pull request Nov 5, 2025
@vonzshik

vonzshik commented Nov 5, 2025

Copy link
Copy Markdown
Contributor

Backported to 9.0.5 via 04304d6, 8.0.9 via a5bede5

@trivalik

This comment was marked as resolved.

@roji

This comment was marked as resolved.

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.

.NET Framework broken in 8.0.8 for first connect

3 participants