Skip to content

Commit a5bede5

Browse files
trivalikvonzshik
authored andcommitted
handles SSL ConnectionReset on Windows; fixes #6274 (#6287)
Fixes #6274 (cherry picked from commit ed512e5)
1 parent b732322 commit a5bede5

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/Npgsql/Internal/NpgsqlConnector.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -558,9 +558,7 @@ static async Task OpenCore(
558558
{
559559
await conn.Authenticate(username, timeout, async, cancellationToken).ConfigureAwait(false);
560560
}
561-
catch (PostgresException e)
562-
when (e.SqlState == PostgresErrorCodes.InvalidAuthorizationSpecification &&
563-
(sslMode == SslMode.Prefer && conn.IsSecure || sslMode == SslMode.Allow && !conn.IsSecure))
561+
catch when (sslMode == SslMode.Prefer && conn.IsSecure || sslMode == SslMode.Allow && !conn.IsSecure)
564562
{
565563
cancellationRegistration.Dispose();
566564
Debug.Assert(!conn.IsBroken);

0 commit comments

Comments
 (0)