From 875f4076ecc5a6345173ac58cfb471516130c895 Mon Sep 17 00:00:00 2001 From: Poorna Date: Mon, 14 Aug 2023 21:31:41 -0700 Subject: [PATCH] site replication: avoid retries when peer is offline (#17853) --- cmd/site-replication.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cmd/site-replication.go b/cmd/site-replication.go index 9c2037892..781fe9673 100644 --- a/cmd/site-replication.go +++ b/cmd/site-replication.go @@ -2560,7 +2560,13 @@ func (c *SiteReplicationSys) siteReplicationStatus(ctx context.Context, objAPI O func(deploymentID string, p madmin.PeerInfo) error { admClient, err := c.getAdminClient(ctx, deploymentID) if err != nil { - return err + switch err.(type) { + case RemoteTargetConnectionErr: + sris[depIdx[deploymentID]] = madmin.SRInfo{} + return nil + default: + return err + } } srInfo, err := admClient.SRMetaInfo(ctx, opts) if err != nil {