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 (0.9.6c). 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 after every SSL_read(...) (it's not required after every CAsyncSocket::Receive(...) for a non-SSL socket)?
 
Thanks
 
Mike
 

Reply via email to