diff --git a/discovery/transport_protocols.go b/discovery/transport_protocols.go index e52c0f2..412f1ae 100644 --- a/discovery/transport_protocols.go +++ b/discovery/transport_protocols.go @@ -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 }