-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
improve SslStream exception after disposal #79329
Conversation
Tagging subscribers to this area: @dotnet/ncl, @vcsjones Issue DetailsAs noted in #78586, Note that repro provided by @mikeharder still fails occasionally. That means that either closes #32577
|
src/libraries/System.Net.Security/src/System/Net/Security/SslStream.IO.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Net.Security/src/System/Net/Security/SslStream.IO.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Net.Security/src/System/Net/Security/SslStream.IO.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Net.Security/src/System/Net/Security/SslStream.IO.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Net.Security/src/System/Net/Security/SslStream.IO.cs
Outdated
Show resolved
Hide resolved
test failures is #80169. |
As noted in #78586,
CloseInternal
(e.g. Disose) can set_nestedRead
to 1 and then we can throw misleading exception on next Read(Async). There are some checks in place but this seems to be race condition - I was not able to write reliable functional test for it.This change basically splits the value so we can reliably determine when it was set by disposal.
Note that repro provided by @mikeharder still fails occasionally. That means that either
HttpClient
orAzure.Core.Pipeline
does concurrent reads and that is not permitted bySslStream
.Investigating that is separate from the misleading exception.
closes #32577