summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/mattn/go-xmpp/xmpp.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/mattn/go-xmpp/xmpp.go')
-rw-r--r--vendor/github.com/mattn/go-xmpp/xmpp.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/vendor/github.com/mattn/go-xmpp/xmpp.go b/vendor/github.com/mattn/go-xmpp/xmpp.go
index 84c4ad41..6af9a3ed 100644
--- a/vendor/github.com/mattn/go-xmpp/xmpp.go
+++ b/vendor/github.com/mattn/go-xmpp/xmpp.go
@@ -191,7 +191,9 @@ func (o Options) NewClient() (*Client, error) {
tlsconn = tls.Client(c, o.TLSConfig)
} else {
DefaultConfig.ServerName = host
- tlsconn = tls.Client(c, &DefaultConfig)
+ newconfig := DefaultConfig
+ newconfig.ServerName = host
+ tlsconn = tls.Client(c, &newconfig)
}
if err = tlsconn.Handshake(); err != nil {
return nil, err
@@ -635,7 +637,7 @@ func (c *Client) SendPresence(presence Presence) (n int, err error) {
// SendKeepAlive sends a "whitespace keepalive" as described in chapter 4.6.1 of RFC6120.
func (c *Client) SendKeepAlive() (n int, err error) {
- return fmt.Fprintf(c.conn," ")
+ return fmt.Fprintf(c.conn, " ")
}
// SendHtml sends the message as HTML as defined by XEP-0071
@@ -831,7 +833,7 @@ type rosterItem struct {
func nextStart(p *xml.Decoder) (xml.StartElement, error) {
for {
t, err := p.Token()
- if err != nil && err != io.EOF || t == nil {
+ if err != nil || t == nil {
return xml.StartElement{}, err
}
switch t := t.(type) {