From 132ce941393ed1ae562a08475361135c436c1347 Mon Sep 17 00:00:00 2001 From: Joachim Brandon LeBlanc Date: Mon, 9 Mar 2020 11:56:21 -0500 Subject: [PATCH] backend/s3: use the provided size parameter when allocating a new memory pool - fixes #4047 (#4049) --- backend/s3/s3.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/s3/s3.go b/backend/s3/s3.go index 9090c782d..e62d85ee7 100644 --- a/backend/s3/s3.go +++ b/backend/s3/s3.go @@ -1917,7 +1917,7 @@ func (f *Fs) getMemoryPool(size int64) *pool.Pool { if !ok { f.pools[size] = pool.New( time.Duration(f.opt.MemoryPoolFlushTime), - int(f.opt.ChunkSize), + int(size), f.opt.UploadConcurrency*fs.Config.Transfers, f.opt.MemoryPoolUseMmap, )