On Sun, Oct 23, 2011, Akanksha Shukla wrote:

> Hi Stephen,
> 
>  
> 
> I tried with retry logic as well (though earlier it was also same), but same
> result.
> 
>  
> 
> int retryCounter = 0;
> 
> while(retryCounter < CONNECT_MAX_TRY)
> 
> {
> 
>     int retVal = BIO_do_connect(conn);
> 
>     if(retVal <= 0)
> 
>     {
> 
>          if(BIO_should_retry(conn))
> 
>          {
> 
>               retryCounter++;
> 
>               sleep(CONNECT_SLEEP_INTERVAL);
> 
>               continue;
> 
>         }
> 
>         else
> 
>         {
> 
>             cout << " The Bio_do_connect failed" << endl;
> 
>  
> 
>         }
> 
>    }
> 
> }
> 
>  
> 
> Just wanted to let you know that this piece of code is same at time when I
> used BIO_new_connect() followed by BIO_set_nbio() and Bio_do_connect() with
> similar code mentioned above, then things were working fine. This time
> rather than using Bio_new_connect(), I used socket(), connect() and
> Bio_new_socket() API call followed by bio_set_nbio() and Bio_do_connect()
> (as suggested by you), then things started failing.
> 
>  
> 
> Please let me know if you have any suggestions or help me in pointing out
> the issue.
> 
>  

Try adding some more debugging code to see if it actually does retry and also
if it fails call the OpenSSL ERR library to print out any useful message. For
example ERR_print_errors_fp(stderr);

Steve.
--
Dr Stephen N. Henson. OpenSSL project core developer.
Commercial tech support now available see: http://www.openssl.org
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to