From 571774edb424c4102a26262cfc709814c16ac41d Mon Sep 17 00:00:00 2001 From: mathieui Date: Sun, 24 Jan 2021 21:43:49 +0100 Subject: xmlstream: end the parser when the stream has ended --- slixmpp/xmlstream/xmlstream.py | 1 + 1 file changed, 1 insertion(+) diff --git a/slixmpp/xmlstream/xmlstream.py b/slixmpp/xmlstream/xmlstream.py index 57922bbc..c9247cec 100644 --- a/slixmpp/xmlstream/xmlstream.py +++ b/slixmpp/xmlstream/xmlstream.py @@ -431,6 +431,7 @@ class XMLStream(asyncio.BaseProtocol): log.debug("End of stream received") self.disconnect_reason = "End of stream" self.abort() + return elif self.xml_depth == 1: # A stanza is an XML element that is a direct child of # the root element, hence the check of depth == 1 -- cgit v1.2.3