|
|
|
@ -51,18 +51,15 @@ func connect(options xmpp.Options, directTLS bool) (*xmpp.Client, error) {
|
|
|
|
|
options.NoTLS = false
|
|
|
|
|
options.StartTLS = false
|
|
|
|
|
options.Host = net.JoinHostPort(server, "5223")
|
|
|
|
|
// Connect to server
|
|
|
|
|
client, err := options.NewClient()
|
|
|
|
|
return client, err
|
|
|
|
|
} else {
|
|
|
|
|
// Try port 5222 if no xmpp-client SRV records are provided and directTLS is not set.
|
|
|
|
|
options.NoTLS = true
|
|
|
|
|
options.StartTLS = true
|
|
|
|
|
options.Host = net.JoinHostPort(server, "5222")
|
|
|
|
|
// Connect to server
|
|
|
|
|
client, err := options.NewClient()
|
|
|
|
|
return client, err
|
|
|
|
|
}
|
|
|
|
|
// Connect to server
|
|
|
|
|
client, err := options.NewClient()
|
|
|
|
|
return client, err
|
|
|
|
|
}
|
|
|
|
|
// Connect to server
|
|
|
|
|
client, err := options.NewClient()
|
|
|
|
|