Skip to content

Commit

Permalink
20 seconds timeout removal (#767)
Browse files Browse the repository at this point in the history
Co-authored-by: Benjamin Perez <[email protected]>
Co-authored-by: Daniel Valdivia <[email protected]>
  • Loading branch information
3 people authored May 24, 2021
1 parent 003eaae commit db9b616
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions restapi/user_objects.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
}
Expand Down

0 comments on commit db9b616

Please sign in to comment.