use GlobalContext instead of context.Background when possible (#10254)

This commit is contained in:
Harshavardhana
2020-08-13 09:16:01 -07:00
committed by GitHub
parent ab43804efd
commit e7ba78beee
7 changed files with 20 additions and 14 deletions

View File

@@ -1173,7 +1173,7 @@ func (web *webAPIHandlers) Upload(w http.ResponseWriter, r *http.Request) {
}
}
if mustReplicate {
defer replicateObject(context.Background(), bucket, object, objInfo.VersionID, objectAPI, &eventArgs{
defer replicateObject(GlobalContext, bucket, object, objInfo.VersionID, objectAPI, &eventArgs{
EventName: event.ObjectCreatedPut,
BucketName: bucket,
Object: objInfo,