Prevent iq errors & timeouts on /join completion

This commit is contained in:
mathieui 2012-05-10 18:22:10 +02:00
parent c0c0b16218
commit 5498ad37c8

View file

@ -1714,7 +1714,10 @@ class Core(object):
if jid.resource or jid.full.endswith('/'): if jid.resource or jid.full.endswith('/'):
# we are writing the resource: complete the node # we are writing the resource: complete the node
if not the_input.last_completion: if not the_input.last_completion:
response = self.xmpp.plugin['xep_0030'].get_items(jid=jid.server, block=True, timeout=1) try:
response = self.xmpp.plugin['xep_0030'].get_items(jid=jid.server, block=True, timeout=1)
except:
response = None
if response: if response:
items = response['disco_items'].get_items() items = response['disco_items'].get_items()
else: else: