aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2019-07-29 12:16:43 +0200
committerDaniel Stenberg <daniel@haxx.se>2019-07-29 22:31:30 +0200
commitd23e87d551d2d99201d7eb275029b6f0660f5136 (patch)
tree0d424848e7e398327286274f04e91a54fb78aebe /lib
parentfc6045f5d1367b3bd60bb00aa9bed5164f000aee (diff)
progress: reset download/uploaded counter
... to make CURLOPT_MAX_RECV_SPEED_LARGE and CURLOPT_MAX_SEND_SPEED_LARGE work correctly on subsequent transfers that reuse the same handle. Fixed-by: Ironbars13 on github Fixes #4084 Closes #4161
Diffstat (limited to 'lib')
-rw-r--r--lib/progress.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/progress.c b/lib/progress.c
index 9f953ef5a..8f81f28b7 100644
--- a/lib/progress.c
+++ b/lib/progress.c
@@ -238,6 +238,8 @@ void Curl_pgrsStartNow(struct Curl_easy *data)
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.downloaded = 0;
+ data->progress.uploaded = 0;
/* clear all bits except HIDE and HEADERS_OUT */
data->progress.flags &= PGRS_HIDE|PGRS_HEADERS_OUT;
Curl_ratelimit(data, data->progress.start);