remove context deadline from Delete calls (#10901)

This commit is contained in:
Harshavardhana 2020-11-17 09:09:45 -08:00 committed by GitHub
parent 0745736e28
commit 80b8ce89a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 7 deletions

View File

@ -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
}