mirror of
https://github.com/schollz/croc.git
synced 2025-10-10 21:01:02 +02:00
Merge pull request #767 from tnothy/fix-throttling-upload-speed-limit
fix upload speed throttling
This commit is contained in:
commit
6f3e0f1eaf
1 changed files with 2 additions and 2 deletions
|
@ -225,8 +225,8 @@ func New(ops Options) (c *Client, err error) {
|
|||
panic("Could not parse given Upload Limit")
|
||||
}
|
||||
}
|
||||
// Somehow 4* is necessary
|
||||
rt = rate.Every(time.Second / (4 * time.Duration(uploadLimit)))
|
||||
|
||||
rt = rate.Every(time.Second / time.Duration(uploadLimit))
|
||||
if int(uploadLimit) > minBurstSize {
|
||||
minBurstSize = int(uploadLimit)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue