Skip to content

Commit

Permalink
Merge pull request #18 from Donnerdiebel/master
Browse files Browse the repository at this point in the history
Fixed bug causing libvirtd: End of file while reading data: Input/out…
  • Loading branch information
zhangjianweibj authored Jan 25, 2020
2 parents 9863e51 + 697dec5 commit 7607c55
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions prometheus-libvirt-exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,8 @@ func CollectFromLibvirt(ch chan<- prometheus.Metric, uri string) error {
return err
}

defer l.Disconnect()

host, err := l.ConnectGetHostname()
if err != nil {
log.Fatalf("failed to get hostname: %v", err)
Expand Down

0 comments on commit 7607c55

Please sign in to comment.