Skip to content

Commit

Permalink
return on error to avoid sending to recordsCh
Browse files Browse the repository at this point in the history
  • Loading branch information
astj committed Jul 25, 2018
1 parent 5cd1fbd commit a5df21e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions metrics/windows/disk.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ func (g *DiskGenerator) queryWmiWithTimeout() ([]win32PerfFormattedDataPerfDiskP
var records []win32PerfFormattedDataPerfDiskPhysicalDisk
if err := wmi.Query("SELECT * FROM Win32_PerfFormattedData_PerfDisk_LogicalDisk ", &records); err != nil {
errCh <- err
return
}
recordsCh <- records
}()
Expand Down

0 comments on commit a5df21e

Please sign in to comment.