To Md Lazreg:

I think I found it.

ready_sockets = ::select(m_max_socket + 1, rfds, 0, 0,&tv);
if (ready_sockets > 0)
{
if (FD_ISSET(s->get_sock(),p->get_rfds()))
{
new_s->set_non_blocking(true); /* GAK!!!! */
if (s->accept(new_s))
{ /* HERE */
call the code above which will call SSL_accept
}
else
{
/*error handling*/
}


The line marked with the 'GAK' should be:

s->set_non_blocking(true);

You don't want the listening socket to block when you call 'accept' on it.
You can't make the newly-accepted socket non-blocking until after it exists.

At the 'HERE' tag, you should probably have a:
new_s->set_non_blocking(true);

Because you don't want the newly-accepted connection to block either.
(Though you may already cover that by setting the BIO non-blocking.)

DS


__________________________________________________ ____________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users@openssl.org
Automated List Manager majordomo@openssl.org