Skip to content

Commit

Permalink
Merge pull request #767 from tnothy/fix-throttling-upload-speed-limit
Browse files Browse the repository at this point in the history
fix upload speed throttling
  • Loading branch information
schollz authored Jul 29, 2024
2 parents 07c0a80 + 8681a4d commit 6f3e0f1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/croc/croc.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 6f3e0f1

Please sign in to comment.