[PATCH] lib/transfer.c: Remove factor of 8 from sleep time
Date: Mon, 6 Apr 2015 14:26:07 -0400
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
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.
I tested the fix by using wireshark to verify the upload requests are
instead of bursty afterwards in my program.
-- Da-Yoon Chung
- text/x-patch attachment: 0001-lib-transfer.c-Remove-factor-of-8-from-sleep-time-ca.patch