aboutsummaryrefslogtreecommitdiff
path: root/tests/unit
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2014-05-15 20:43:32 +0200
committerDaniel Stenberg <daniel@haxx.se>2014-05-15 21:28:19 +0200
commit84bd19ffd4374fd7b4fbe5a0ee0ecbf263d52ede (patch)
tree3262cadb8d5a84edfa0ce7b7e758309f4d56861c /tests/unit
parent678239df547bacf762dea664dabf1ce207f0a048 (diff)
timers: fix timer regression involving redirects / reconnects
In commit 0b3750b5c23c25f (released in 7.36.0) we fixed a timeout issue but instead broke the timings. To fix this, I introduce a new timestamp to use for the timeouts and restored the previous timestamp and timestamp position so that the old timer functionality is restored. In addition to that, that change also broke connection timeouts for when more than one connect was used (as it would then count the total time from the first connect and not for the most recent one). Now Curl_timeleft() has been modified so that it checks against different start times depending on which timeout it checks. Test 1303 is updated accordingly. Bug: http://curl.haxx.se/mail/lib-2014-05/0147.html Reported-by: Ryan Braud
Diffstat (limited to 'tests/unit')
-rw-r--r--tests/unit/unit1303.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/unit/unit1303.c b/tests/unit/unit1303.c
index 2e4f23096..b48a6250c 100644
--- a/tests/unit/unit1303.c
+++ b/tests/unit/unit1303.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -131,6 +131,8 @@ const struct timetest run[] = {
/* this is the pretended start time of the transfer */
data->progress.t_startsingle.tv_sec = BASE;
data->progress.t_startsingle.tv_usec = 0;
+data->progress.t_startop.tv_sec = BASE;
+data->progress.t_startop.tv_usec = 0;
for(i=0; i < sizeof(run)/sizeof(run[0]); i++) {
NOW(run[i].now_s, run[i].now_us);