prevent traceback when we receive a presence but we are no more connected. Fixes #5028

This commit is contained in:
Yann Leboulanger 2009-05-20 10:33:19 +02:00
parent fdf30b15b5
commit ffd82a69a4
1 changed files with 3 additions and 0 deletions

View File

@ -2072,6 +2072,9 @@ class ConnectionHandlers(ConnectionVcard, ConnectionBytestream, ConnectionDisco,
if ptype and not ptype in rfc_types:
ptype = None
log.debug('PresenceCB: %s' % ptype)
if not self.connection or self.connected < 2:
log.debug('account is no more connected')
return
try:
who = helpers.get_full_jid_from_iq(prs)
except Exception: