@ -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
if err == nil {
return client, nil
return client, fmt.Errorf("failed to connect to server: %w", err)