From f04c03cbf9357ad702ddc71979bc1e25c0c32538 Mon Sep 17 00:00:00 2001
From: Jono Wenger <jono@elixxir.io>
Date: Tue, 31 May 2022 11:37:29 -0700
Subject: [PATCH] Move file transfer max throughput info print before new rate
 limiter

---
 fileTransfer2/batchBuilder.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fileTransfer2/batchBuilder.go b/fileTransfer2/batchBuilder.go
index 23c286051..cac74970a 100644
--- a/fileTransfer2/batchBuilder.go
+++ b/fileTransfer2/batchBuilder.go
@@ -35,10 +35,10 @@ func (m *manager) batchBuilderThread(stop *stoppable.Single) {
 	rl := ratelimit.NewUnlimited()
 	if m.params.MaxThroughput > 0 {
 		rate := m.params.MaxThroughput / avgSendSize
-		rl = ratelimit.New(rate, ratelimit.WithoutSlack)
 		jww.INFO.Printf("[FT] Max throughput is %d. "+
 			"File transfer will be rate limited to %d parts per second.",
 			m.params.MaxThroughput, rate)
+		rl = ratelimit.New(rate, ratelimit.WithoutSlack)
 	} else {
 		jww.WARN.Printf("[FT] Max throughput is %d. "+
 			"File transfer will not be rate limited.", m.params.MaxThroughput)
-- 
GitLab