1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-16 22:50:10 +03:00

M #-: close all ZMQ subscribers

This commit is contained in:
Ruben S. Montero 2020-05-21 09:44:37 +02:00 committed by GitHub
commit f5ecdd012c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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