Skip to content
Snippets Groups Projects
Commit a6c9d944 authored by NGUYEN Do Duc Anh's avatar NGUYEN Do Duc Anh
Browse files

fix bug: checking converge time not correctly

parent f6137fd7
No related branches found
No related tags found
No related merge requests found
......@@ -404,7 +404,9 @@ def proceed_self_stabilizing_VC():
# Checking the state change to deploy or remove the IDS unikernel
# If I stay at VC set more than 5s -> I deploy IDS unikernel, otherwise, IDS unikernel must be destroyed
is_ids_deployed = False
old_time_converge = node.converge_time
while True:
if old_time_converge != node.converge_time:
if not is_ids_deployed and node.state == State.DECIDED_IN_VC and (time.time() - node.converge_time) > CONVERGE_TIME_THRESHOLD:
is_ids_deployed = True
IdsOpportunistic.ids_queue.put((node.myid, time.time(), is_ids_deployed))
......@@ -413,6 +415,7 @@ def proceed_self_stabilizing_VC():
is_ids_deployed = False
IdsOpportunistic.ids_queue.put((node.myid, time.time(), is_ids_deployed))
print("IDS Removal request")
old_time_converge = node.converge_time
def main():
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment