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):
|
def connect_to_next_ip(self):
|
||||||
if len(self.ais) == 0:
|
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)
|
log.error('Connection failure to %s', str(self.host), exc_info=True)
|
||||||
|
if len(self.addresses_) > 0: return self.get_next_addrinfo()
|
||||||
self.disconnect()
|
self.disconnect()
|
||||||
return
|
return
|
||||||
ai = self.ais.pop(0)
|
ai = self.ais.pop(0)
|
||||||
|
@ -489,8 +489,12 @@ class P2PConnection(IdleObject, PlugIn):
|
||||||
self._do_send()
|
self._do_send()
|
||||||
|
|
||||||
def pollend(self):
|
def pollend(self):
|
||||||
self.state = -1
|
if self.state == 0: # error in connect()?
|
||||||
self.disconnect()
|
#self.disconnect()
|
||||||
|
self.connect_to_next_ip()
|
||||||
|
else:
|
||||||
|
self.state = -1
|
||||||
|
self.disconnect()
|
||||||
|
|
||||||
def pollin(self):
|
def pollin(self):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in New Issue