summaryrefslogtreecommitdiff
path: root/esds/simulator.py
diff options
context:
space:
mode:
authorLoic Guegan <loic.guegan@mailbox.org>2023-11-16 10:11:30 +0100
committerLoic Guegan <loic.guegan@mailbox.org>2023-11-16 10:11:30 +0100
commit96d8faef18d09fa5c7fcb2d9fdea6942ff95f039 (patch)
tree85175b65e43a4596418c1af50b6541e304919bad /esds/simulator.py
parent2b92cd319548d44ec82c57ebcde422f3e32b2e3e (diff)
Fix node id
Diffstat (limited to 'esds/simulator.py')
-rw-r--r--esds/simulator.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/esds/simulator.py b/esds/simulator.py
index 3433d72..14ee7b4 100644
--- a/esds/simulator.py
+++ b/esds/simulator.py
@@ -83,7 +83,7 @@ class Simulator:
if intf not in self.netmat.keys():
self.log("Cannot create node "+str(Node.available_node_id)+": interface "+ intf + " unknown")
exit(1)
- node=Node(src, interfaces, grp)
+ node=Node(src, interfaces, grp, len(self.nodes)) # len(self.nodes) starts at 0 since append just below
self.nodes.append(node)
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())