summaryrefslogtreecommitdiff
path: root/xmpp/encoder_decoder.go
diff options
context:
space:
mode:
authorxengineering <me@xengineering.eu>2023-06-16 17:06:20 +0200
committerxengineering <me@xengineering.eu>2023-06-16 17:12:09 +0200
commitae8d61bee60a29e2bbfc9cfbb400d8451d00de11 (patch)
tree5a7cec2b0195ac41ba8a6d33ece45804bb2ff29a /xmpp/encoder_decoder.go
parent2d9864426272055151c42cf6bc2d13fbe11ca50c (diff)
downloadlimox-ae8d61bee60a29e2bbfc9cfbb400d8451d00de11.tar
limox-ae8d61bee60a29e2bbfc9cfbb400d8451d00de11.tar.zst
limox-ae8d61bee60a29e2bbfc9cfbb400d8451d00de11.zip
Add chan xml.Token xmpp.session.rx
This allows the goroutine which fetches all tokens from the server to forward them to the main goroutine of the session.
Diffstat (limited to 'xmpp/encoder_decoder.go')
-rw-r--r--xmpp/encoder_decoder.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/xmpp/encoder_decoder.go b/xmpp/encoder_decoder.go
index c8ccd89..7a917da 100644
--- a/xmpp/encoder_decoder.go
+++ b/xmpp/encoder_decoder.go
@@ -65,7 +65,8 @@ func (ed *encoderDecoder) run() {
if err != nil { log.Println("Could not encode to server stream log") }
err = ed.sl.Flush()
if err != nil { log.Println("Could not flush server stream log") }
- _ = xml.CopyToken(t) // TODO do something meaningful here
+ c := xml.CopyToken(t)
+ ed.session.rx <- c
}
if err != nil {
if errors.Is(err, io.EOF) { return }