From 7fc8ea8ca5efb6adf6fa7c54d1b39f010e17eb7b Mon Sep 17 00:00:00 2001 From: xengineering Date: Thu, 18 May 2023 21:43:37 +0200 Subject: Handle server side debug in xmpp/decoder.go --- xmpp/xmpp.go | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'xmpp/xmpp.go') 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 } } } -- cgit v1.2.3-70-g09d2