From 89d44601930f4a9452fd40c2262652b1a847a8cf Mon Sep 17 00:00:00 2001 From: xengineering Date: Sun, 4 Jun 2023 17:12:04 +0200 Subject: Re-implement XML encoding --- xmpp/session.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'xmpp/session.go') diff --git a/xmpp/session.go b/xmpp/session.go index 71b3acf..db9a079 100644 --- a/xmpp/session.go +++ b/xmpp/session.go @@ -24,8 +24,6 @@ func StartSession(out chan any, jid string, pwd string) chan any { s.in = make(chan any) s.out = out - s.ed = newEncoderDecoder(&s) - go s.run() return s.in @@ -38,6 +36,8 @@ func (s *session) run() { if err != nil { return } defer s.transport.Close() + s.ed = newEncoderDecoder(s) + s.out <- SessionConnect{} for { -- cgit v1.2.3-70-g09d2