summaryrefslogtreecommitdiff
path: root/lib/progress.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2020-11-07 23:53:24 +0100
committerDaniel Stenberg <daniel@haxx.se>2020-11-09 08:19:09 +0100
commita570f7cd09f05657fd8521e833e149f7639e25a8 (patch)
treeae659ffba2251759017ef003cd37ca80ec34c5b4 /lib/progress.c
parent5d57a79929e90c380a7f79392a4f3829db1235be (diff)
downloadcurl-a570f7cd09f05657fd8521e833e149f7639e25a8.tar.gz
Curl_pgrsStartNow: init speed limit time stamps at start
By setting the speed limit time stamps unconditionally at transfer start, we can start off a transfer without speed limits and yet allow them to get set during transfer and have an effect. Reported-by: Kael1117 on github Fixes #6162 Closes #6184
Diffstat (limited to 'lib/progress.c')
-rw-r--r--lib/progress.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/progress.c b/lib/progress.c
index 0a7631c40..658d05ab8 100644
--- a/lib/progress.c
+++ b/lib/progress.c
@@ -240,10 +240,8 @@ void Curl_pgrsStartNow(struct Curl_easy *data)
data->progress.speeder_c = 0; /* reset the progress meter display */
data->progress.start = Curl_now();
data->progress.is_t_startransfer_set = false;
- data->progress.ul_limit_start.tv_sec = 0;
- data->progress.ul_limit_start.tv_usec = 0;
- data->progress.dl_limit_start.tv_sec = 0;
- data->progress.dl_limit_start.tv_usec = 0;
+ data->progress.ul_limit_start = data->progress.start;
+ data->progress.dl_limit_start = data->progress.start;
data->progress.downloaded = 0;
data->progress.uploaded = 0;
/* clear all bits except HIDE and HEADERS_OUT */