diff options
author | Daniel Stenberg <daniel@haxx.se> | 2023-01-29 10:59:56 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2023-01-29 16:06:06 +0100 |
commit | e7512e78c2c5a6d07b47239122c2880bf6ac0e3a (patch) | |
tree | 174be10d18c2ddb4e2e37f9e2eee9e2d35b195d6 /src | |
parent | 0c3d54269ec0de0364fb09e9f3a38622a8120ece (diff) | |
download | curl-e7512e78c2c5a6d07b47239122c2880bf6ac0e3a.tar.gz |
tool_operate: repair --rate
Regression from a55256cfb242 (7.87.0)
Reported-by: highmtworks on github
Fixes #10357
Closes #10358
Diffstat (limited to 'src')
-rw-r--r-- | src/tool_operate.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/tool_operate.c b/src/tool_operate.c index 6b139a3cc..2fccfda67 100644 --- a/src/tool_operate.c +++ b/src/tool_operate.c @@ -2421,6 +2421,7 @@ static CURLcode serial_transfers(struct GlobalConfig *global, bool retry; long delay_ms; bool bailout = FALSE; + struct timeval start; result = pre_transfer(global, per); if(result) break; @@ -2430,7 +2431,7 @@ static CURLcode serial_transfers(struct GlobalConfig *global, if(result) break; } - + start = tvnow(); #ifdef CURLDEBUG if(global->test_event_based) result = curl_easy_perform_ev(per->curl); @@ -2462,7 +2463,7 @@ static CURLcode serial_transfers(struct GlobalConfig *global, if(per && global->ms_per_transfer) { /* how long time did the most recent transfer take in number of milliseconds */ - long milli = tvdiff(tvnow(), per->start); + long milli = tvdiff(tvnow(), start); if(milli < global->ms_per_transfer) { notef(global, "Transfer took %ld ms, waits %ldms as set by --rate\n", milli, global->ms_per_transfer - milli); |