diff options
-rw-r--r-- | slixmpp/xmlstream/xmlstream.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/slixmpp/xmlstream/xmlstream.py b/slixmpp/xmlstream/xmlstream.py index 0b5a55e1..8daf99e4 100644 --- a/slixmpp/xmlstream/xmlstream.py +++ b/slixmpp/xmlstream/xmlstream.py @@ -358,6 +358,10 @@ class XMLStream(asyncio.BaseProtocol): event. This could trigger one or more event (a stanza is received, the stream is opened, etc). """ + if self.parser is None: + log.warning('Received data before the connection is established: %r', + data) + return self.parser.feed(data) try: for event, xml in self.parser.read_events(): |