link-local: on error after connect(), try next address
This commit is contained in:
parent
25240888d5
commit
81154aea3e
|
@ -376,8 +376,8 @@ class P2PConnection(IdleObject, PlugIn):
|
|||
|
||||
def connect_to_next_ip(self):
|
||||
if len(self.ais) == 0:
|
||||
if len(self.addresses_) > 0: return self.get_next_addrinfo()
|
||||
log.error('Connection failure to %s', str(self.host), exc_info=True)
|
||||
if len(self.addresses_) > 0: return self.get_next_addrinfo()
|
||||
self.disconnect()
|
||||
return
|
||||
ai = self.ais.pop(0)
|
||||
|
@ -489,6 +489,10 @@ class P2PConnection(IdleObject, PlugIn):
|
|||
self._do_send()
|
||||
|
||||
def pollend(self):
|
||||
if self.state == 0: # error in connect()?
|
||||
#self.disconnect()
|
||||
self.connect_to_next_ip()
|
||||
else:
|
||||
self.state = -1
|
||||
self.disconnect()
|
||||
|
||||
|
|
Loading…
Reference in New Issue