Skip to content

Commit

Permalink
[ingester] fix deepflow-stats name empty may cause panic
Browse files Browse the repository at this point in the history
  • Loading branch information
lzf575 committed Oct 16, 2023
1 parent aa524d4 commit a9ec769
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/ingester/ext_metrics/decoder/decoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ func (d *Decoder) handleDeepflowStats(vtapID uint16, decoder *codec.SimpleDecode
d.counter.ErrorCount++
return
}
if err := pbStats.Unmarshal(bytes); err != nil {
if err := pbStats.Unmarshal(bytes); err != nil || pbStats.Name == "" {
if d.counter.ErrorCount == 0 {
log.Warningf("deepflow stats parse failed, err msg: %s", err)
}
Expand Down

0 comments on commit a9ec769

Please sign in to comment.