From db9b61677ce34dbe778e0de70b57f64df2030cbd Mon Sep 17 00:00:00 2001 From: Alex <33497058+bexsoft@users.noreply.github.com> Date: Mon, 24 May 2021 13:48:41 -0500 Subject: [PATCH] 20 seconds timeout removal (#767) Co-authored-by: Benjamin Perez Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com> --- restapi/user_objects.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/restapi/user_objects.go b/restapi/user_objects.go index cb2e794fb3..2616869904 100644 --- a/restapi/user_objects.go +++ b/restapi/user_objects.go @@ -125,8 +125,6 @@ func registerObjectsHandlers(api *operations.ConsoleAPI) { // getListObjectsResponse returns a list of objects func getListObjectsResponse(session *models.Principal, params user_api.ListObjectsParams) (*models.ListObjectsResponse, *models.Error) { - ctx, cancel := context.WithTimeout(context.Background(), time.Second*20) - defer cancel() var prefix string var recursive bool var withVersions bool @@ -151,7 +149,7 @@ func getListObjectsResponse(session *models.Principal, params user_api.ListObjec // defining the client to be used minioClient := minioClient{client: mClient} - objs, err := listBucketObjects(ctx, minioClient, params.BucketName, prefix, recursive, withVersions) + objs, err := listBucketObjects(params.HTTPRequest.Context(), minioClient, params.BucketName, prefix, recursive, withVersions) if err != nil { return nil, prepareError(err) }