From 66ff17e4526171e9f83a4e364219756975fe98ab Mon Sep 17 00:00:00 2001 From: jiuker <2818723467@qq.com> Date: Tue, 28 Mar 2023 00:15:23 +0800 Subject: [PATCH] fix: Avoid multiple write responses (#16894) --- cmd/bucket-replication-handlers.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmd/bucket-replication-handlers.go b/cmd/bucket-replication-handlers.go index e61a2d261dbc4..65246518515c8 100644 --- a/cmd/bucket-replication-handlers.go +++ b/cmd/bucket-replication-handlers.go @@ -277,6 +277,7 @@ func (api objectAPIHandlers) ResetBucketReplicationStartHandler(w http.ResponseW Bucket: bucket, Err: fmt.Errorf("invalid query parameter older-than %s for %s : %w", durationStr, bucket, err), }), r.URL) + return } } resetBeforeDate := UTCNow().AddDate(0, 0, -1*int(days/24)) @@ -347,6 +348,7 @@ func (api objectAPIHandlers) ResetBucketReplicationStartHandler(w http.ResponseW default: writeErrorResponseJSON(ctx, w, toAPIError(ctx, err), r.URL) } + return } targets, err := globalBucketTargetSys.ListBucketTargets(ctx, bucket) if err != nil {