mirror of
https://github.com/minio/minio.git
synced 2025-04-01 02:03:42 -04: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
|
// Other helpers
|
||||||
|
|
||||||
func getAdminClient(endpoint, accessKey, secretKey string) (*madmin.AdminClient, error) {
|
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")
|
client, err := madmin.New(epURL.Host, accessKey, secretKey, epURL.Scheme == "https")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
Loading…
x
Reference in New Issue
Block a user