Skip to content

Commit db9b616

Browse files
bexsoftBenjamin Perezdvaldivia
authored
20 seconds timeout removal (#767)
Co-authored-by: Benjamin Perez <benjamin@bexsoft.net> Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
1 parent 003eaae commit db9b616

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

restapi/user_objects.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,6 @@ func registerObjectsHandlers(api *operations.ConsoleAPI) {
125125

126126
// getListObjectsResponse returns a list of objects
127127
func getListObjectsResponse(session *models.Principal, params user_api.ListObjectsParams) (*models.ListObjectsResponse, *models.Error) {
128-
ctx, cancel := context.WithTimeout(context.Background(), time.Second*20)
129-
defer cancel()
130128
var prefix string
131129
var recursive bool
132130
var withVersions bool
@@ -151,7 +149,7 @@ func getListObjectsResponse(session *models.Principal, params user_api.ListObjec
151149
// defining the client to be used
152150
minioClient := minioClient{client: mClient}
153151

154-
objs, err := listBucketObjects(ctx, minioClient, params.BucketName, prefix, recursive, withVersions)
152+
objs, err := listBucketObjects(params.HTTPRequest.Context(), minioClient, params.BucketName, prefix, recursive, withVersions)
155153
if err != nil {
156154
return nil, prepareError(err)
157155
}

0 commit comments

Comments
 (0)