Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Applies to: .NET Core
Symptoms
A time-out occurs when you run an application that's using the System.Net.Security.SslStream class and that calls the System.Net.Socket.Poll method to check data on the underlying socket. When this issue occurs, the Poll method returns a value of false.
Cause
The SslStream class is reading data from the socket faster than the application can read data from the stream buffer.
Solution
To work around this issue, use one of the following methods:
- Don't use the
Pollmethod in the application. Instead, use the Asynchronous Programming Model (APM) pattern to get callbacks when data arrives. - If you must use the
Pollmethod, when the method returns a value oftrue, make sure that all the stream buffer data was read before you enter anotherPollcall.