I believe that the timeout you see is the timeout of the CURL operation, not the connection timeout. These two are different.
CURLOPT_TIMEOUT(and CURLOPT_TIMEOUT_MSfor millisecond values) controls the timeout for CURL to work after it is connected. CUROPT_CONNECTTIMEOUT(i CUROPT_CONNECTTIMEOUT_MS) control the timeout for the initial connection (DNS lookup, connection establishment, etc.)
If I am right, then if you set CURLOPT_TIMEOUT above 1, you should find that your timeout no longer works at 1000 ms.