prevent Traceback when server replies badly to resource binding request. Fixes #4880
This commit is contained in:
parent
a9f233d2cd
commit
9b5c8db2ce
|
@ -484,6 +484,7 @@ class NonBlockingBind(PlugIn):
|
|||
|
||||
def _on_bound(self, resp):
|
||||
if isResultNode(resp):
|
||||
if resp.getTag('bind') and resp.getTag('bind').getTagData('jid'):
|
||||
self.bound.append(resp.getTag('bind').getTagData('jid'))
|
||||
log.info('Successfully bound %s.' % self.bound[-1])
|
||||
jid = JID(resp.getTag('bind').getTagData('jid'))
|
||||
|
@ -492,7 +493,8 @@ class NonBlockingBind(PlugIn):
|
|||
self._owner.SendAndWaitForResponse(Protocol('iq', typ='set',
|
||||
payload=[Node('session', attrs={'xmlns':NS_SESSION})]),
|
||||
func=self._on_session)
|
||||
elif resp:
|
||||
return
|
||||
if resp:
|
||||
log.error('Binding failed: %s.' % resp.getTag('error'))
|
||||
self.on_bound(None)
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue