From 8681a4dc6d84c3baa3e8690224469fa20e4b8711 Mon Sep 17 00:00:00 2001 From: tnothy <29799259+tnothy@users.noreply.github.com> Date: Mon, 29 Jul 2024 21:46:25 +0200 Subject: [PATCH] fix upload speed throttling --- src/croc/croc.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/croc/croc.go b/src/croc/croc.go index dd16cc32b..88a429147 100644 --- a/src/croc/croc.go +++ b/src/croc/croc.go @@ -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) }