mirror of
https://salsa.debian.org/mdosch/go-sendxmpp
synced 2024-11-12 13:10:25 +00:00
Fix issue with SRV lookup for xmpps-client.
This commit is contained in:
parent
6c3fe6246a
commit
e4e33cdf75
@ -288,8 +288,11 @@ func main() {
|
||||
server = *flagServer
|
||||
}
|
||||
|
||||
// Lookup SRV record for xmpps-client if direct TLS is requested and the server is not
|
||||
// specified.
|
||||
// Determine server part if no server is specified.
|
||||
if server == "" {
|
||||
server = strings.Split(user, "@")[1]
|
||||
|
||||
// Lookup SRV record for xmpps-client if direct TLS is requested
|
||||
if *flagTLS {
|
||||
if _, addrs, err := net.LookupSRV("xmpps-client", "tcp", server); err == nil {
|
||||
|
||||
@ -307,9 +310,6 @@ func main() {
|
||||
}
|
||||
}
|
||||
|
||||
// Use the JIDs server part if no server is specified.
|
||||
if server == "" {
|
||||
server = strings.Split(user, "@")[1]
|
||||
}
|
||||
|
||||
// Overwrite password if specified via command line flag.
|
||||
|
Loading…
Reference in New Issue
Block a user