From 7357706efeb785c40d41093fc7284f3189d3f1d9 Mon Sep 17 00:00:00 2001 From: Tino Vazquez Date: Fri, 19 Jun 2020 14:11:14 +0200 Subject: [PATCH] F #4302: Close vCenter connection to avoid running our of sockets --- src/im_mad/remotes/lib/vcenter_cluster.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/im_mad/remotes/lib/vcenter_cluster.rb b/src/im_mad/remotes/lib/vcenter_cluster.rb index 6f1bd37337..0f4edd067c 100644 --- a/src/im_mad/remotes/lib/vcenter_cluster.rb +++ b/src/im_mad/remotes/lib/vcenter_cluster.rb @@ -145,8 +145,10 @@ class Cluster cluster_monitoring end + # Try connectivity to a vCenter instance and close the connection def beacon_host - VCenterDriver::VIClient.new(connection, @host.id) + vi_client = VCenterDriver::VIClient.new(connection, @host.id) + vi_client.close_connection Time.now.to_s end