From 39374984ef5ad1e86f70e7273f66914baad8e10c Mon Sep 17 00:00:00 2001 From: Michael Yang Date: Thu, 7 Mar 2024 17:31:45 -0800 Subject: [PATCH] set limit to increment --- server/download.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/download.go b/server/download.go index fef2fc53..ed67d898 100644 --- a/server/download.go +++ b/server/download.go @@ -451,7 +451,7 @@ func watchDelta(ctx context.Context, g *LimitGroup, c *atomic.Int64, limit int64 continue } - limit += int64(x) + limit += min(int64(x), int64(runtime.NumCPU())) slog.Debug("setting", "limit", limit) g.SetLimit(limit) }