From 67e063ba00e1ab4b204b9502b7400725ec080054 Mon Sep 17 00:00:00 2001 From: divyam234 <47589864+divyam234@users.noreply.github.com> Date: Mon, 3 Jun 2024 01:57:34 +0530 Subject: [PATCH] chore: close upload pool after file upload --- pkg/services/upload.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/services/upload.go b/pkg/services/upload.go index 4e467b1..680dc3c 100644 --- a/pkg/services/upload.go +++ b/pkg/services/upload.go @@ -162,6 +162,8 @@ func (us *UploadService) UploadFile(c *gin.Context) (*schemas.UploadPartOut, *ty uploadPool := pool.NewPool(client, int64(us.cnf.PoolSize), middlewares...) + defer uploadPool.Close() + logger := logging.FromContext(c) logger.Debugw("uploading chunk", "fileName", uploadQuery.FileName,