Skip to content

Break connection if Wait gets timeout with SSL and netstandard2.0 - #4415

Merged
roji merged 1 commit into
npgsql:mainfrom
roji:WaitExceptions
Apr 15, 2022
Merged

roji merged 1 commit into
npgsql:mainfrom
roji:WaitExceptions

Conversation

@roji

@roji roji commented Apr 15, 2022

Copy link
Copy Markdown
Member

Because in .NET Framework, SslStream is dead after any IOException.

Fixes #4342

@roji
roji requested a review from vonzshik as a code owner April 15, 2022 20:17
Comment thread src/Npgsql/Internal/NpgsqlReadBuffer.cs Outdated

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Note a small fix here: before, if a cancellation was requested, we just bubbled up the exception, unlike non-Wait where we would throw a new OperationCanceledException (presumably to get the right cancellation token). This PR aligns Wait with that.

Because in .NET Framework, SslStream is dead after any IOException.

Fixes npgsql#4342
@roji
roji merged commit 4f48bb3 into npgsql:main Apr 15, 2022
@roji
roji deleted the WaitExceptions branch April 15, 2022 20:47
roji added a commit that referenced this pull request Apr 15, 2022
)

Because in .NET Framework, SslStream is dead after any IOException.

Fixes #4342

(cherry picked from commit 4f48bb3)
@roji

roji commented Apr 15, 2022

Copy link
Copy Markdown
Member Author

Backported to 6.0.4 via 65a7ec7

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.

Unknown message code with Wait

2 participants