diff --git a/cmd/storage-rest-client.go b/cmd/storage-rest-client.go index f8cfa6a54..a101c2297 100644 --- a/cmd/storage-rest-client.go +++ b/cmd/storage-rest-client.go @@ -323,10 +323,7 @@ func (client *storageRESTClient) DeleteVersion(ctx context.Context, volume, path return err } - tctx, cancel := context.WithTimeout(ctx, 5*time.Second) - defer cancel() - - respBody, err := client.call(tctx, storageRESTMethodDeleteVersion, values, &buffer, -1) + respBody, err := client.call(ctx, storageRESTMethodDeleteVersion, values, &buffer, -1) defer http.DrainBody(respBody) return err } @@ -506,9 +503,8 @@ func (client *storageRESTClient) Delete(ctx context.Context, volume string, path values.Set(storageRESTVolume, volume) values.Set(storageRESTFilePath, path) values.Set(storageRESTRecursive, strconv.FormatBool(recursive)) - tctx, cancel := context.WithTimeout(ctx, 5*time.Second) - defer cancel() - respBody, err := client.call(tctx, storageRESTMethodDeleteFile, values, nil, -1) + + respBody, err := client.call(ctx, storageRESTMethodDeleteFile, values, nil, -1) defer http.DrainBody(respBody) return err }