Mercurial > libervia-backend
changeset 3020:af9d71303605
plugin XEP-0198: don't crash if transport is None in onAckTimeOut
author | Goffi <goffi@goffi.org> |
---|---|
date | Sun, 21 Jul 2019 10:16:32 +0200 |
parents | c9f03b1eb64d |
children | 8ec35cf13f66 |
files | sat/plugins/plugin_xep_0198.py |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/sat/plugins/plugin_xep_0198.py Sat Jul 20 20:55:17 2019 +0200 +++ b/sat/plugins/plugin_xep_0198.py Sun Jul 21 10:16:32 2019 +0200 @@ -510,7 +510,11 @@ def onAckTimeOut(self, client): """Called when a requested ACK has not been received in time""" log.info(_(u"Ack was not received in time, aborting connection")) - client.xmlstream.transport.abortConnection() + transport = client.xmlstream.transport + if transport is None: + log.warning(u"transport was already removed") + else: + transport.abortConnection() client._xep_0198_session.req_timer = None