curl-library
Re: [PATCH] lib/transfer.c: Remove factor of 8 from sleep time
From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 7 Apr 2015 21:56:40 +0200 (CEST)
Date: Tue, 7 Apr 2015 21:56:40 +0200 (CEST)
On Mon, 6 Apr 2015, Da-Yoon Chung wrote:
> I ran into this small bug while using the CURLOPT_MAX_SEND_SPEED_LARGE
> option for curl_easy_setopt. The function that calculates the amount of time
> to sleep for rate limiting purposes has an additional factor of 8, most
> likely an incorrect byte-to-bit conversion because pkt_size and rate_bps are
> already in bytes, so curl sleeps 8 times longer than intended and then races
> to catch up.
Wow, thanks a lot. Merged now!
-- / daniel.haxx.se ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.htmlReceived on 2015-04-07