Configure CURLOPT_CONNECTTIMEOUT 

Configure CURLOPT_CONNECTTIMEOUT for libcurl library which will close th.e TCP connection

and trigger the callback registered by the application.

Minumum connect timeout is tcp syn retries on the system, setting the connect
timeout to a low value ensures the callback is triggered after the system
timeout if connect fails.

Note if the CURLOPT_CONNECTTIMEOUT parameter is not configured it waits indefinelty.