[Florob] Fix logic error resulting in a None type exception.
This commit is contained in:
parent
a48087aae7
commit
1f954582fb
|
@ -1915,9 +1915,9 @@ class ConnectionHandlers(ConnectionVcard, ConnectionBytestream,
|
|||
# Anyway, it is the old behavior when we assumed that
|
||||
# not-existing contacts don't support anything
|
||||
contact_exists = bool(contact)
|
||||
session_supported = contact_exists and \
|
||||
contact.supports(common.xmpp.NS_SSN) or \
|
||||
contact.supports(common.xmpp.NS_ESESSION)
|
||||
session_supported = contact_exists and (
|
||||
contact.supports(common.xmpp.NS_SSN) or
|
||||
contact.supports(common.xmpp.NS_ESESSION))
|
||||
if session_supported:
|
||||
sess.terminate()
|
||||
del self.sessions[jid][sess.thread_id]
|
||||
|
|
Loading…
Reference in New Issue