mirror of
https://github.com/schollz/croc.git
synced 2025-10-11 05:11:06 +02:00
fix upload speed throttling
This commit is contained in:
parent
07c0a804d7
commit
8681a4dc6d
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")
|
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 {
|
if int(uploadLimit) > minBurstSize {
|
||||||
minBurstSize = int(uploadLimit)
|
minBurstSize = int(uploadLimit)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue