Sleep during threads to avoid loops that run infinitely

This commit is contained in:
Yohann D'ANELLO 2021-01-01 18:07:41 +01:00
parent ac249716f7
commit 9ef3be22e8
Signed by: ynerant
GPG Key ID: 3A75C55819C8CF85
1 changed files with 6 additions and 0 deletions

View File

@ -720,6 +720,9 @@ class HazelManager(Thread):
self.squirrel.send_neighbours()
self.last_neighbour = time.time()
# Avoid infinite loops
time.sleep(1)
class Inondator(Thread):
"""
@ -740,6 +743,9 @@ class Inondator(Thread):
# inundate
self.squirrel.main_inundation()
# Avoid infinite loops
time.sleep(1)
class Message:
"""