plugin (xml log): workaround for a crash on big stanzas
This commit is contained in:
parent
1a16f085d0
commit
228f26e5b3
1 changed files with 3 additions and 1 deletions
|
|
@ -49,7 +49,9 @@ class LoggingXmlStream(XmlStream):
|
|||
return XmlStream.send(self, obj)
|
||||
|
||||
def dataReceived(self, data):
|
||||
self._host.bridge.xmlLog("IN", data.decode('utf-8'), self._profile)
|
||||
# FIXME: we use "replace" here because a big stanza can be cut in the middle of a unicode char
|
||||
# this plugin should probably moved to a better place, where stanzas are fully received
|
||||
self._host.bridge.xmlLog("IN", data.decode('utf-8', 'replace'), self._profile)
|
||||
return XmlStream.dataReceived(self, data)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue