Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/python-nbxmpp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/nbxmpp
diff options
context:
space:
mode:
authorlovetox <philipp@hoerist.com>2020-04-10 00:42:06 +0300
committerlovetox <philipp@hoerist.com>2020-04-10 00:42:06 +0300
commitec3c756b9c7657dee552ef196aa492df3db57fdd (patch)
treee52cee155bc64509e9dd960f4fc7c0f0d683b8ec /nbxmpp
parent7ba2e6af91e170c6539e1f0f7c039870a82d5c3f (diff)
TCP: Pass Node objects instead of actual data on data-sent
- Use for logging the actual data passed to GLib - Pass a Node object on data-sent so applications don't have to reparse it
Diffstat (limited to 'nbxmpp')
-rw-r--r--nbxmpp/tcp.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/nbxmpp/tcp.py b/nbxmpp/tcp.py
index 9668a0a..7a07002 100644
--- a/nbxmpp/tcp.py
+++ b/nbxmpp/tcp.py
@@ -289,14 +289,13 @@ class TCPConnection(Connection):
self._write_stanzas()
return
- for stanza in self._write_stanza_buffer:
- self._log_stanza(stanza, received=False)
- self._write_stanza_buffer = None
+ self._log_stanza(data, received=False)
- try:
- self.notify('data-sent', data)
- except Exception:
- self._log.exception('Error while executing data-sent:')
+ for stanza in self._write_stanza_buffer:
+ try:
+ self.notify('data-sent', stanza)
+ except Exception:
+ self._log.exception('Error while executing data-sent:')
if self._output_closed and not self._write_queue:
self._check_for_shutdown()