plugin XEP-0198: don't crash if transport is None in onAckTimeOut

This commit is contained in:
Goffi 2019-07-21 10:16:32 +02:00
commit 200ee13a97

View file

@ -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