Reset/flush saved contents from bad metric (#4646)
This commit is contained in:
parent
cd4c4e7fbd
commit
e9eeda555e
|
@ -63,6 +63,7 @@ func (p *Parser) Parse(input []byte) ([]telegraf.Metric, error) {
|
|||
for p.machine.ParseLine() {
|
||||
err := p.machine.Err()
|
||||
if err != nil {
|
||||
p.handler.Reset()
|
||||
return nil, &ParseError{
|
||||
Offset: p.machine.Position(),
|
||||
msg: err.Error(),
|
||||
|
|
Loading…
Reference in New Issue