cURL / Mailing Lists / curl-library / Single Mail

curl-library

Fix for millisecond precision timeout in libcurl

From: Moshenko, Jacob <moshenko_at_amazon.com>
Date: Mon, 1 Mar 2010 10:42:45 -0800

Hello,

When using libcurl I stumbled upon a bug using sub-second precision timeouts with libcurl. If you set millisecond timeouts (e.g. TIMEOUT_MS to 200ms) the logging output will report that it has timed out after the appropriate amount of time. The actual elapsed time however will be rounded up to the nearest second (e.g. 1s for 200ms timeout). I have created a patch to the library that will fix the reporting of the actual timeout duration as well as the timeout itself.

Any feedback is welcome, please let me know if I need to do anything else.

Thanks,
Jacob Moshenko

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html

Received on 2010-03-01