diff --git a/src/flow/lib/EventManager.rb b/src/flow/lib/EventManager.rb index 06c4885b07..acb263ed16 100644 --- a/src/flow/lib/EventManager.rb +++ b/src/flow/lib/EventManager.rb @@ -254,6 +254,10 @@ class EventManager next if !nodes.empty? && rc_nodes[:failure].empty? + nodes.each do |id| + unsubscribe(id, state, lcm_state, subscriber) + end + # If any node is in error wait action will fails return [false, rc_nodes] unless rc_nodes[:failure].empty? @@ -268,6 +272,8 @@ class EventManager rc_nodes[:successful] << id end + subscriber.close + [true, rc_nodes] end @@ -337,6 +343,8 @@ class EventManager subscriber.setsockopt(ZMQ::UNSUBSCRIBE, 'EVENT API one.vm.update 1') + subscriber.close + [true, rc_nodes] end