Commit ec3c756b authored by Philipp Hörist's avatar Philipp Hörist
Browse files

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
parent 7ba2e6af
......@@ -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()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment