I have a Windows client application written in MFC (VC++ 6.0) which is receiving a file from a server. I'm using my own socket class derived from CAsyncSocket, to which I've added OpenSSL support. The file transfer hangs randomly - if I run it ten times it will hang at a different point each time. The client hangs because it stops receiving socket notifications that there is data available to read (the CAsyncSocket::OnReceive(...) callback function is not being called). If I add an AsyncSelect(FD_READ | FD_WRITE | FD_CLOSE) immediately after the SSL_read(...) call this resolves the hang.
 
Is this an OpenSSL bug or is the AsyncSelect really required (it's not required for a non-SSL socket).
 
TIA
 
Mike
 

Reply via email to