facebook/tornado — pull request #1017 by SuminAndrew (2014-03-16 17:57:53+00:00)
Title: fix timeouts less than 1 sec when libcurl is compiled without c-ares

Consider the following excerpt from libcurl documentation:

```CURLOPT_CONNECTTIMEOUT_MS

Like CURLOPT_CONNECTTIMEOUT but takes the number of milliseconds instead. If libcurl is built to use the standard system name resolver, that portion of the connect will still use full-second resolution for timeouts with a minimum timeout allowed of one second. (Added in 7.16.2)```

That means, if the timeout has a value less than a second, it will fail if libcurl is built without c-ares. We should check this and fall back to the minimum value (1 second).

It is also safe (and preferable) to set NOSIGNAL when using libcurl + c-ares. However, without c-ares it leads to ignoring all timeouts.