diff --git a/lib/multi.c b/lib/multi.c index e62f237693..5456113be7 100644 --- a/lib/multi.c +++ b/lib/multi.c @@ -1064,6 +1064,10 @@ static void multi_getsock(struct Curl_easy *data, case MSTATE_PERFORMING: Curl_pollset_add_socks(data, ps, Curl_single_getsock); break; + + case MSTATE_RATELIMITING: + /* nothing to wait for */ + return; } /* Let connection filters add/remove as needed */ diff --git a/lib/progress.c b/lib/progress.c index b0fc4aa48f..e96cbf7af4 100644 --- a/lib/progress.c +++ b/lib/progress.c @@ -304,7 +304,7 @@ timediff_t Curl_pgrsLimitWaitTime(curl_off_t cursize, * 'actual' is the time in milliseconds it took to actually download the * last 'size' bytes. */ - actual = Curl_timediff(now, start); + actual = Curl_timediff_ceil(now, start); if(actual < minimum) { /* if it downloaded the data faster than the limit, make it wait the difference */