timeout: use the correct start value as offset
authorDaniel Stenberg <daniel@haxx.se>
Fri, 17 Sep 2010 21:02:33 +0000 (23:02 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 17 Sep 2010 21:02:33 +0000 (23:02 +0200)
commita76f852ca41b9972eff1ddf52d5de8a90cfad521
treeddeb3f92bc86893ccce8ae16b724ddf4687269d9
parent3880dd3741204965dde312643a18190a24c66ba9
timeout: use the correct start value as offset

Rodric provide an awesome recipe that proved libcurl didn't timeout at
the requested time - it instead often timed out at [connect time] +
[timeout time] instead of the documented and intended [timeout time]
only. This bug was due to the code using the wrong base offset when
comparing against "now". I could also take the oppurtinity to simplify
the code by properly using of the generic help function for this:
Curl_timeleft.

Reported by: Rodric Glaser
Bug: http://curl.haxx.se/bug/view.cgi?id=3061535
lib/transfer.c