Only do ensurePort for XMPP transport

If we always do this the address gets mangled, breaking the transport
selection.
This commit is contained in:
Wichert Akkerman
2019-10-12 15:49:22 +02:00
committed by Mickaël Rémond
parent a189748b9c
commit 8fb3e33a1f
2 changed files with 2 additions and 2 deletions
+2
View File
@@ -39,5 +39,7 @@ func NewTransport(config TransportConfiguration) Transport {
if strings.HasPrefix(config.Address, "ws:") || strings.HasPrefix(config.Address, "wss:") {
return &WebsocketTransport{Config: config}
}
config.Address = ensurePort(config.Address, 5222)
return &XMPPTransport{Config: config}
}