Skip to content

Commit

Permalink
use lastSample.IsZero()
Browse files Browse the repository at this point in the history
  • Loading branch information
zak-pawel committed Sep 4, 2024
1 parent b47fae9 commit 933446e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/inputs/vsphere/vsan.go
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ func (e *Endpoint) queryPerformance(ctx context.Context, vsanClient *soap.Client
}
if len(timeStamps) > 0 {
lastSample := timeStamps[len(timeStamps)-1]
if !lastSample.Equal(time.Time{}) && lastSample.After(latest) {
if !lastSample.IsZero() && lastSample.After(latest) {
latest = lastSample
}
}
Expand Down

0 comments on commit 933446e

Please sign in to comment.