From a84ca7bcdb128a166f832aeac8a792ef614d2f34 Mon Sep 17 00:00:00 2001 From: Pontus Rydin Date: Wed, 12 Sep 2018 14:06:38 -0400 Subject: [PATCH] Remove call to View.Destroy() that causes errors to be logged by vCenter (#4684) --- plugins/inputs/vsphere/client.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/plugins/inputs/vsphere/client.go b/plugins/inputs/vsphere/client.go index b9547b17..2148a72f 100644 --- a/plugins/inputs/vsphere/client.go +++ b/plugins/inputs/vsphere/client.go @@ -164,12 +164,10 @@ func (c *Client) close() { // to close it multiple times. c.closeGate.Do(func() { ctx := context.Background() - if c.Views != nil { - c.Views.Destroy(ctx) - - } if c.Client != nil { - c.Client.Logout(ctx) + if err := c.Client.Logout(ctx); err != nil { + log.Printf("E! [input.vsphere]: Error during logout: %s", err) + } } }) }