summaryrefslogtreecommitdiff
path: root/xmpp/xmpp.go
diff options
context:
space:
mode:
authorxengineering <me@xengineering.eu>2023-05-18 21:43:37 +0200
committerxengineering <me@xengineering.eu>2023-05-18 21:43:37 +0200
commit7fc8ea8ca5efb6adf6fa7c54d1b39f010e17eb7b (patch)
tree956dad006d8e623a36ae2a3213f7246ac5567502 /xmpp/xmpp.go
parent05f50be52b03c7e84ba47d3b5349321920748f8b (diff)
downloadlimox-7fc8ea8ca5efb6adf6fa7c54d1b39f010e17eb7b.tar
limox-7fc8ea8ca5efb6adf6fa7c54d1b39f010e17eb7b.tar.zst
limox-7fc8ea8ca5efb6adf6fa7c54d1b39f010e17eb7b.zip
Handle server side debug in xmpp/decoder.go
Diffstat (limited to 'xmpp/xmpp.go')
-rw-r--r--xmpp/xmpp.go10
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
}
}
}