fix: regression in adding new replication targets (#11257)

This commit is contained in:
Harshavardhana
2021-01-11 09:08:42 -08:00
committed by GitHub
parent e4e117faab
commit 317305d5f9

View File

@@ -129,11 +129,7 @@ func (sys *BucketTargetSys) SetTarget(ctx context.Context, bucket string, tgt *m
sys.Lock()
defer sys.Unlock()
tgts, ok := sys.targetsMap[bucket]
if !ok {
return BucketRemoteTargetNotFound{Bucket: bucket}
}
tgts := sys.targetsMap[bucket]
newtgts := make([]madmin.BucketTarget, len(tgts))
labels := make(map[string]struct{}, len(tgts))
found := false