Mercurial > libervia-backend
changeset 2487:ed1d71b91b29
plugin XEP-0166: added errback to terminate, which only logs issues
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 01 Feb 2018 07:21:41 +0100 |
parents | 031aa3cc67ac |
children | 78c7992a26ed |
files | src/plugins/plugin_xep_0166.py |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/plugins/plugin_xep_0166.py Tue Jan 30 08:43:52 2018 +0100 +++ b/src/plugins/plugin_xep_0166.py Thu Feb 01 07:21:41 2018 +0100 @@ -140,6 +140,9 @@ log.warning(u"Error while managing jingle session, cancelling: {condition}".format(error_condition)) client.send(iq_elt) + def _terminateEb(self, failure_): + log.warning(_(u"Error while terminating session: {msg}").format(msg=failure_)) + def terminate(self, reason, session, profile): """Terminate the session @@ -159,6 +162,7 @@ reason_elt.addChild(elt) self._delSession(client, session['id']) d = iq_elt.send() + d.addErrback(self._terminateEb) return d ## errors which doesn't imply a stanza sending ##