summaryrefslogtreecommitdiff
path: root/esds/node.py
diff options
context:
space:
mode:
Diffstat (limited to 'esds/node.py')
-rw-r--r--esds/node.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/esds/node.py b/esds/node.py
index 7fc62dc..03c7457 100644
--- a/esds/node.py
+++ b/esds/node.py
@@ -13,7 +13,7 @@ class Node:
self.rargs=None # Store the requests arguments
self.plugins=list() # Contains all registered node plugins
self.rqueue=queue.Queue() # Receive simulator acknowledgments
- self.chest={"state":"running", "turned_on":True, "request": None, "interfaces":dict(), "interfaces_queue_size":dict()}
+ self.chest={"state":"running", "turned_on":True, "request": None, "interfaces":dict(), "interfaces_queue_size":dict(), "pending_plugin_notify":0}
for interface in interfaces:
self.chest["interfaces"][interface]=queue.Queue()
self.chest["interfaces_queue_size"][interface]=0
@@ -200,7 +200,10 @@ class Node:
ack=None
while True:
ack=self.rqueue.get() # Wait for simulator acknowledgments
- if ack[0] not in ack_types:
+ if ack[0] == "plugin_notify":
+ self.plugin_notify(ack[1],ack[2])
+ self["pending_plugin_notify"]-=1
+ elif ack[0] not in ack_types:
ack_buffer.append(ack)
else:
break