Skip to content

Commit

Permalink
Remove call to View.Destroy() that causes errors to be logged by vCen…
Browse files Browse the repository at this point in the history
  • Loading branch information
prydin authored and rgitzel committed Oct 17, 2018
1 parent 115b197 commit dd3cee6
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions plugins/inputs/vsphere/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
})
}

0 comments on commit dd3cee6

Please sign in to comment.