We actually don't want to immediately learn again here, or we risk an infinite recursiion.

pull/446/head
jMyles 2018-09-21 21:41:59 +02:00
parent fb7a2716c6
commit 8df28ce369
1 changed files with 3 additions and 2 deletions

View File

@ -497,12 +497,13 @@ class Character(Learner):
nodes_i_need=self._node_ids_to_learn_about_immediately,
announce_nodes=announce_nodes,
certificate_path=current_teacher.certificate_filepath)
except requests.exceptions.ConnectionError:
except requests.exceptions.ConnectionError as e:
unresponsive_nodes.add(current_teacher)
teacher_rest_info = current_teacher.rest_information()[0]
# TODO: This error isn't necessarily "no repsonse" - let's maybe pass on the text of the exception here.
self.log.info("No Response from teacher: {}:{}.".format(teacher_rest_info.host, teacher_rest_info.port))
self.cycle_teacher_node()
self.learn_from_teacher_node()
return
if response.status_code != 200: