You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a bug in your code. The call to SslStream.BeginRead is completing synchronously, and is therefore invoking receive() synchronously. Your receive() then synchronously invokes beginread() , which in turn invokes SslStream.BeginRead synchronously, and so on.
The correct way to use the APM pattern is to check in the callback whether IAsyncResult.CompletedSynchronously is true. If it it's true, then the callback should exit immediately, and the call site should proceed to do the completion work; if it's false, then the callback should do the work. CompletedSynchronously exists to avoid stack dives like this.
BeginRead() throw stackoverflowexception
net core 2.2 console application
stack info:
The text was updated successfully, but these errors were encountered: