~samwhited/xmpp

3482700b93487c0faf81bc893f3887d7dc300870 — Sam Whited 2 years ago e37609c
xmpp: fix bug where stream processing stops
1 files changed, 3 insertions(+), 2 deletions(-)

M session.go
M session.go => session.go +3 -2
@@ 379,13 379,14 @@ func handleInputStream(s *Session, handler Handler) (err error) {
				goto noreply
			}

			inner := xmlstream.Inner(r)
			c <- iqResponder{
				r: xmlstream.MultiReader(xmlstream.Token(start), xmlstream.Inner(r), xmlstream.Token(start.End())),
				r: xmlstream.MultiReader(xmlstream.Token(start), inner, xmlstream.Token(start.End())),
				c: c,
			}
			<-c
			// Consume the rest of the stream before continuing the loop.
			_, err = xmlstream.Copy(discard, r)
			_, err = xmlstream.Copy(discard, inner)
			if err != nil {
				return err
			}