flaub/openssl-net — Issue #2: Timing issue on SSlStreamBase.cs (AsyncHandshakeCallback)
Author: bikashjoshi
Created: 2011-10-21 16:59:35+00:00
State: open

I am having a timing issue on my client application on the method AsyncHandshakeCallback of class SslStreamBase.
If I put Thread.Sleep(100) on the first line of this method, I am able to connect into the server.

However, without Thread.Sleep, I am not able to connect to the server.

The server does not use managed open SSL and I got exception thrown at following line of the client code:
class: Bio.cs,
line 258,
method : ArraySegment ReadBytes(int count)

The stack trace shows that this method is called from line 1041 of SslStreamBase.cs.