M #-: close all ZMQ subscribers

This commit is contained in:
Alejandro Huertas committed 2020-05-20 15:30:23 +02:00
1 parent d7a2f69841
commit 063c3fbef3
1 file changed
+8
+8
View File
@@ -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