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() {
|
for p.machine.ParseLine() {
|
||||||
err := p.machine.Err()
|
err := p.machine.Err()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
p.handler.Reset()
|
||||||
return nil, &ParseError{
|
return nil, &ParseError{
|
||||||
Offset: p.machine.Position(),
|
Offset: p.machine.Position(),
|
||||||
msg: err.Error(),
|
msg: err.Error(),
|
||||||
|
|
Loading…
Reference in New Issue