http_client_config - set_timeout is not working

Dec 30, 2013 at 12:26 PM
Hello Guys,

I am working on to reduce the time taken by rest SDK for unreachable IPs. I need to set the timeout to less than 5 seconds, where it was set to 30 seconds by default. But setting to 5 seconds is not working, as it is taking the default time(30-40 seconds) while sending requests for "Unreachable IPs". Could you please help me out in this regard? Below is my code snippet
  __  http_client_config config = http_client_config();
    config.set_validate_certificates(false);
    config.set_timeout(utility::seconds(5));        
    http_client client(baseURI, config);__
Coordinator
Jan 2, 2014 at 10:55 PM
Hi Thameem,

We can repro this issue for unreachable IPs.
http_client calls WinHTTPSetTimeouts to set the different timeouts, and looks like we use the timeout from http_client_config for send and receive timeout, not for resolve and connect (default is 60 secs). This could be the possible reason for the bug you have encountered.
We will investigate this further and address it in one of our coming releases.
Thank you for reporting the issue.

Thanks
Kavya