Skip to content

Commit

Permalink
Merge pull request #13950 from liggitt/revert-srv-dot-3.5
Browse files Browse the repository at this point in the history
Revert #13714
  • Loading branch information
ptabor authored Apr 19, 2022
2 parents 0452fee + 081b4e2 commit b872757
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
3 changes: 1 addition & 2 deletions client/pkg/srv/srv.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,9 @@ func GetClient(service, domain string, serviceName string) (*SRVClients, error)
return err
}
for _, srv := range addrs {
shortHost := strings.TrimSuffix(srv.Target, ".")
urls = append(urls, &url.URL{
Scheme: scheme,
Host: net.JoinHostPort(shortHost, fmt.Sprintf("%d", srv.Port)),
Host: net.JoinHostPort(srv.Target, fmt.Sprintf("%d", srv.Port)),
})
}
srvs = append(srvs, addrs...)
Expand Down
8 changes: 4 additions & 4 deletions client/pkg/srv/srv_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,12 +226,12 @@ func TestSRVDiscover(t *testing.T) {
},
{
[]*net.SRV{
{Target: "a.example.com.", Port: 2480},
{Target: "b.example.com.", Port: 2480},
{Target: "c.example.com", Port: 2480},
{Target: "a.example.com", Port: 2480},
{Target: "b.example.com", Port: 2480},
{Target: "c.example.com.", Port: 2480},
},
[]*net.SRV{},
[]string{"https://a.example.com:2480", "https://b.example.com:2480", "https://c.example.com:2480"},
[]string{"https://a.example.com:2480", "https://b.example.com:2480", "https://c.example.com.:2480"},
false,
},
}
Expand Down

0 comments on commit b872757

Please sign in to comment.