From 200ee13a974c7821c2f961a1959415dd151ab993 Mon Sep 17 00:00:00 2001 From: Goffi Date: Sun, 21 Jul 2019 10:16:32 +0200 Subject: [PATCH] plugin XEP-0198: don't crash if transport is None in onAckTimeOut --- sat/plugins/plugin_xep_0198.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sat/plugins/plugin_xep_0198.py b/sat/plugins/plugin_xep_0198.py index 77133090..f0070824 100644 --- a/sat/plugins/plugin_xep_0198.py +++ b/sat/plugins/plugin_xep_0198.py @@ -510,7 +510,11 @@ class XEP_0198(object): 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