diff options
Diffstat (limited to 'xmpp/xmpp.go')
-rw-r--r-- | xmpp/xmpp.go | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/xmpp/xmpp.go b/xmpp/xmpp.go index 4412a96..773ea44 100644 --- a/xmpp/xmpp.go +++ b/xmpp/xmpp.go @@ -5,7 +5,6 @@ import ( "crypto/x509" "encoding/xml" "log" - "os" ) type Event uint8 @@ -31,9 +30,6 @@ func Run(ch chan Event, jid string, pwd string) { enc := newEncoder(conn) defer enc.Close() - dbg := xml.NewEncoder(os.Stdout) - defer dbg.Close() - end := sendStreamStart(&enc, jid) defer sendStreamEnd(&enc, end) @@ -49,10 +45,8 @@ func Run(ch chan Event, jid string, pwd string) { default: log.Printf("Unknown Event '%d'!\n", ev) } - case rx := <-decoder.data: - dbg.Indent("S: ", " ") - dbg.EncodeToken(rx) - dbg.Flush() + case _ = <-decoder.data: + // do something with incoming tokens here } } } |