From 9df9a5b5f95542e828c68881434c48d5137782dd Mon Sep 17 00:00:00 2001 From: Eugene Agafonov Date: Wed, 23 Dec 2015 23:09:02 +0000 Subject: [PATCH] Remove extra allocation of XML Decoder XML Decoder is allocated in startStream so it overwrites the one allocated in init() --- xmpp.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/xmpp.go b/xmpp.go index 762aa99..5693f00 100644 --- a/xmpp.go +++ b/xmpp.go @@ -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