diff options
author | xengineering <me@xengineering.eu> | 2023-05-20 20:56:00 +0200 |
---|---|---|
committer | xengineering <me@xengineering.eu> | 2023-05-20 20:56:00 +0200 |
commit | 7b29491f10ee31d0c275fa69d96c3ac6af8fa7a7 (patch) | |
tree | e3060255ad5f1a163e479d35f225dd7ed86e0697 | |
parent | 1a920930fe71e569eee124259b43db8e43af3c76 (diff) | |
download | limox-7b29491f10ee31d0c275fa69d96c3ac6af8fa7a7.tar limox-7b29491f10ee31d0c275fa69d96c3ac6af8fa7a7.tar.zst limox-7b29491f10ee31d0c275fa69d96c3ac6af8fa7a7.zip |
Copy received tokens
The bytes the token refers to are just valid until a new token arrives.
See the documentation of the encoding/xml package for details.
-rw-r--r-- | xmpp/decoder.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/xmpp/decoder.go b/xmpp/decoder.go index 070f791..9a2e435 100644 --- a/xmpp/decoder.go +++ b/xmpp/decoder.go @@ -45,7 +45,7 @@ func (r *decoder) run() { if err != nil { log.Println("Could not flush debug output after receive!") } - r.data <- t + r.data <- xml.CopyToken(t) } if err != nil { if errors.Is(err, io.EOF) { |