don't try to resolve wrong streamhost. Fixes #5665

This commit is contained in:
Yann Leboulanger 2010-03-19 14:06:22 +01:00
parent 6aab50d7fa
commit 9a72b97768
1 changed files with 3 additions and 2 deletions

View File

@ -83,6 +83,8 @@ class Proxy65Manager:
host = item.getAttr('host')
port = item.getAttr('port')
jid = item.getAttr('jid')
if not host or not port or not jid:
self.proxies[proxy]._on_connect_failure()
self.proxies[proxy].resolve_result(host, port, jid)
# we can have only one streamhost
raise common.xmpp.NodeProcessed
@ -113,8 +115,7 @@ class ProxyResolver:
self.host = str(host)
self.port = int(port)
self.jid = unicode(jid)
self.state = S_RESOLVED
#FIXME: re-enable proxy testing
self.state = S_INITIAL
log.info('start resolving %s:%s' % (self.host, self.port))
self.receiver_tester = ReceiverTester(self.host, self.port, self.jid,
self.sid, self.sender_jid, self._on_receiver_success,