summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--esds/simulator.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/esds/simulator.py b/esds/simulator.py
index b3bbfc2..93d8e81 100644
--- a/esds/simulator.py
+++ b/esds/simulator.py
@@ -85,7 +85,8 @@ class Simulator:
exit(1)
node=Node(src, interfaces, grp)
self.nodes.append(node)
- thread=threading.Thread(target=node.run,args=[args]) # There must be "daemon=True" as a parameter, but we removed it to be compatible with older version of python
+ thread=threading.Thread(target=node.run,args=[args])
+ thread.setDaemon(True) # May not work on old version of pythons but allow to kill threads when main thread ends (see Node.abort())
thread.start()
def log(self,msg,node=None):