forked from jshiffer/go-xmpp
Only do ensurePort for XMPP transport
If we always do this the address gets mangled, breaking the transport selection.
This commit is contained in:
parent
a189748b9c
commit
8fb3e33a1f
@ -133,8 +133,6 @@ func NewClient(config Config, r *Router) (c *Client, err error) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
config.Address = ensurePort(config.Address, 5222)
|
|
||||||
|
|
||||||
c = new(Client)
|
c = new(Client)
|
||||||
c.config = config
|
c.config = config
|
||||||
c.router = r
|
c.router = r
|
||||||
|
@ -39,5 +39,7 @@ func NewTransport(config TransportConfiguration) Transport {
|
|||||||
if strings.HasPrefix(config.Address, "ws:") || strings.HasPrefix(config.Address, "wss:") {
|
if strings.HasPrefix(config.Address, "ws:") || strings.HasPrefix(config.Address, "wss:") {
|
||||||
return &WebsocketTransport{Config: config}
|
return &WebsocketTransport{Config: config}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
config.Address = ensurePort(config.Address, 5222)
|
||||||
return &XMPPTransport{Config: config}
|
return &XMPPTransport{Config: config}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user