Skip to content

Commit

Permalink
handling nil pointer exception
Browse files Browse the repository at this point in the history
  • Loading branch information
saikalyan.bhagavathula committed Aug 8, 2024
1 parent b4936e6 commit 0eabe07
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion metrics/opsramp.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,9 @@ func (p *OpsRampMetrics) ListenTimeseries() {
select {
case timeSeries, ok := <-timeSeriesChannel:
if ok {
p.frameRequest(timeSeries)
if timeSeries != nil {
p.frameRequest(timeSeries)
}
} else {
p.Logger.Error().Logf("timeSeries channel error")
}
Expand Down

0 comments on commit 0eabe07

Please sign in to comment.