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
This commit is contained in:
Daniel Stenberg 2020-11-07 23:53:24 +01:00
parent 5d57a79929
commit a570f7cd09
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -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 */