only try to connect if node has an ip

This commit is contained in:
j 2015-02-26 14:11:46 +05:30
parent 59062d40c7
commit 919a8454de

View file

@ -225,7 +225,7 @@ class Node(Thread):
self.resolve() self.resolve()
u = self.user u = self.user
logger.debug('go_online peer=%s queued=%s (%s)', u.peered, u.queued, u.id) logger.debug('go_online peer=%s queued=%s (%s)', u.peered, u.queued, u.id)
if u.peered or u.queued and self.host: if (u.peered or u.queued) and self.host:
try: try:
self.online = False self.online = False
logger.debug('try to connect to %s at [%s]:%s', self.user_id, self.host, self.port) logger.debug('try to connect to %s at [%s]:%s', self.user_id, self.host, self.port)