xmlstream: Warn when the parser is None when data is received.
This commit is contained in:
parent
cabf623131
commit
c372bd5168
1 changed files with 4 additions and 0 deletions
|
@ -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():
|
||||
|
|
Loading…
Reference in a new issue