mirror of
https://github.com/minio/minio.git
synced 2024-12-24 06:05:55 -05:00
fix: handle invalid endpoint errors in site replication(#15499)
fixes #15497
This commit is contained in:
parent
1d35f2b58f
commit
2c137c0d04
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user