From 9747034467160db96039dab9044a43f72f26a476 Mon Sep 17 00:00:00 2001 From: ldeffenb Date: Fri, 17 May 2024 16:51:47 -0400 Subject: [PATCH 1/2] fix: allow maxMultiplexForwards to be set to zero --- pkg/pushsync/pushsync.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/pushsync/pushsync.go b/pkg/pushsync/pushsync.go index 90af7cfe8eb..708f6385670 100644 --- a/pkg/pushsync/pushsync.go +++ b/pkg/pushsync/pushsync.go @@ -339,7 +339,7 @@ func (ps *PushSync) pushToClosest(ctx context.Context, ch swarm.Chunk, origin bo resultChan := make(chan receiptResult) - retryC := make(chan struct{}, parallelForwards) + retryC := make(chan struct{}, max(1,parallelForwards)) retry := func() { select { From c4d775d16e028745bc2d9953e43e5969f04ed8cb Mon Sep 17 00:00:00 2001 From: ldeffenb Date: Mon, 20 May 2024 08:54:17 -0400 Subject: [PATCH 2/2] fix: gofmt --- pkg/pushsync/pushsync.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/pushsync/pushsync.go b/pkg/pushsync/pushsync.go index 708f6385670..3feeed67bf4 100644 --- a/pkg/pushsync/pushsync.go +++ b/pkg/pushsync/pushsync.go @@ -339,7 +339,7 @@ func (ps *PushSync) pushToClosest(ctx context.Context, ch swarm.Chunk, origin bo resultChan := make(chan receiptResult) - retryC := make(chan struct{}, max(1,parallelForwards)) + retryC := make(chan struct{}, max(1, parallelForwards)) retry := func() { select {