Skip to content

Commit

Permalink
fix: handle invalid endpoint errors in site replication(minio#15499)
Browse files Browse the repository at this point in the history
  • Loading branch information
poornas authored Aug 8, 2022
1 parent 1d35f2b commit 2c137c0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cmd/site-replication.go
Original file line number Diff line number Diff line change
@@ -2210,7 +2210,10 @@ func (c *SiteReplicationSys) RemoveRemoteTargetsForEndpoint(ctx context.Context,
// Other helpers

func getAdminClient(endpoint, accessKey, secretKey string) (*madmin.AdminClient, error) {
epURL, _ := url.Parse(endpoint)
epURL, err := url.Parse(endpoint)
if err != nil {
return nil, err
}
client, err := madmin.New(epURL.Host, accessKey, secretKey, epURL.Scheme == "https")
if err != nil {
return nil, err

0 comments on commit 2c137c0

Please sign in to comment.