Matthew Allen wrote:
if (Ssl)
{
SSL_shutdown(Ssl);
SSL_free(Ssl);
}
Yes as the other writer says, you may need to close out the BIO (which
is the thing holding the socket descriptor/handle). So the "Bio" object
you created you may need to clean it up (in and around the SSL_free()).
Alternatively if you still get issues with CLOSE_WAIT.
if(SSL_shutdown(Ssl) >= 0)
shutdown(SSL_get_fd(Ssl), SHUT_WR);
Research into using the "shutdown()" system call to half-close a socket,
this has been used in the past, usually with servers to improve
efficiency during disconnection.
Darryl
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users@openssl.org
Automated List Manager majord...@openssl.org