Skip to content

Commit

Permalink
Remove extra allocation of XML Decoder
Browse files Browse the repository at this point in the history
XML Decoder is allocated in startStream so
it overwrites the one allocated in init()
  • Loading branch information
eagafonov committed Dec 23, 2015
1 parent 9aeb372 commit 9df9a5b
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions xmpp.go
Original file line number Diff line number Diff line change
Expand Up @@ -276,12 +276,6 @@ func cnonce() string {
}

func (c *Client) init(o *Options) error {
if o.Debug {
// For debugging: the following causes the plaintext of the connection to be duplicated to stderr.
c.p = xml.NewDecoder(tee{c.conn, os.Stderr})
} else {
c.p = xml.NewDecoder(c.conn)
}

var domain string
var user string
Expand Down

0 comments on commit 9df9a5b

Please sign in to comment.