Simplify connection code.

errwrp
Martin Dosch 1 year ago
parent 28521a16aa
commit 4664c02cbc
No known key found for this signature in database
GPG Key ID: 52A57CFCE13D657D

@ -49,11 +49,11 @@ func connect(options xmpp.Options, directTLS bool) (*xmpp.Client, error) {
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
if err == nil {
return client, nil
}
return client, fmt.Errorf("failed to connect to server: %w", err)
}

Loading…
Cancel
Save