parent
3bb01de120
commit
d4e1b68534
1 changed files with 6 additions and 3 deletions
|
@ -1140,9 +1140,12 @@ class XMLStream(asyncio.BaseProtocol):
|
||||||
if not self._always_send_everything and not self._session_started:
|
if not self._always_send_everything and not self._session_started:
|
||||||
# Avoid circular imports
|
# Avoid circular imports
|
||||||
from slixmpp.stanza.rootstanza import RootStanza
|
from slixmpp.stanza.rootstanza import RootStanza
|
||||||
from slixmpp.stanza import Iq
|
from slixmpp.stanza import Iq, Handshake
|
||||||
is_bind = isinstance(data, Iq) and data.get_plugin('bind', check=True)
|
passthrough = (
|
||||||
if isinstance(data, (RootStanza, str)) and not is_bind:
|
(isinstance(data, Iq) and data.get_plugin('bind', check=True))
|
||||||
|
or isinstance(data, Handshake)
|
||||||
|
)
|
||||||
|
if isinstance(data, (RootStanza, str)) and not passthrough:
|
||||||
self.__queued_stanzas.append(data)
|
self.__queued_stanzas.append(data)
|
||||||
log.debug('NOT SENT: %s %s', type(data), data)
|
log.debug('NOT SENT: %s %s', type(data), data)
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in a new issue