Skip to content

Commit

Permalink
fix remove transport from host discoverd
Browse files Browse the repository at this point in the history
  • Loading branch information
andskur committed Jan 18, 2023
1 parent a5425c5 commit 7d192ea
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion discovery/transport_protocols.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,12 @@ func (s TransportProtocol) String() string {
// FormatAddress add protocol prefix to
// given address
func (s TransportProtocol) FormatAddress(addr string) string {
if s == TransportGrpc {
if s == TransportGrpc ||
strings.Contains(addr, TransportHttps.String()) ||
strings.Contains(addr, TransportWss.String()) {
return addr
}

return s.String() + addr
}

Expand Down

0 comments on commit 7d192ea

Please sign in to comment.