Here is how my ErrorSet is constructed :
fd_set WriteSet; FD_ZERO(&WriteSet); FD_SET(m_sock_fd, &WriteSet); fd_set ErrorSet; FD_ZERO(&ErrorSet ); FD_SET(m_sock_fd, &ErrorSet ); status = select(m_sock_fd+1, NULL, &WriteSet, &ErrorSet , &tv); if (FD_ISSET(m_sock_fd,&WriteSet)) { cout << "Socket in the write set" << endl << flush; } if (FD_ISSET(m_sock_fd,&ErrorSet)) { cout << "Socket in the error set" << endl << flush; } I am not saying that that is how it should behave. I am saying that this is how it is behaving. With the above code and when my server is down, my Windows client will output "Socket in the error set" only. Which means that the socket was put in the ErrorSet and was not put in the WriteSet. Under the same conditions and using the same code, the UNIX client will put the socket in the WriteSet. Of course I do not know why Windows behaves this way, do you know? Thanks On Tue, Aug 25, 2009 at 6:42 PM, David Schwartz <dav...@webmaster.com>wrote: > > Md Lazreg wrote: > > > I do not know why you think my new change allows me to detect soft > > failures. The only change I made is to change this: > > > status = select(m_sock_fd+1, NULL, &WriteSet, NULL, &tv); > > > to this: > > > status = select(m_sock_fd+1, NULL, &WriteSet, &ErrorSet, &tv); > > > Are you saying that for a soft failure, Windows will still put > > the socket in the ErrorSet? > > How is your 'ErrorSet' constructed? > > And you're asking the wrong question. The question you should ask yourself > is -- how can there be a hard error yet the socket not yet be ready for > writing? What could I possibly still be waiting for? > > DS > > > ______________________________________________________________________ > OpenSSL Project http://www.openssl.org > User Support Mailing List openssl-users@openssl.org > Automated List Manager majord...@openssl.org >