Skip to content

Commit

Permalink
fix: duplicate influxdb listener writes
Browse files Browse the repository at this point in the history
The influxdb_listener input plugin, when using the upstream parser had
bad logic that would write first using the new upstream parser and then
attempt to parse the data again with the internal parser right after.
This was leading to EOF errors on the internal parser because the data
had already been read.

Fixes: #10900
  • Loading branch information
powersj committed Apr 25, 2022
1 parent 6ba3b1e commit 8bc12ab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/inputs/influxdb_listener/influxdb_listener.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,9 @@ func (h *InfluxDBListener) handleWrite() http.HandlerFunc {
return func(res http.ResponseWriter, req *http.Request) {
if h.ParserType == "upstream" {
h.handleWriteUpstreamParser(res, req)
} else {
h.handleWriteInternalParser(res, req)
}

h.handleWriteInternalParser(res, req)
}
}

Expand Down

0 comments on commit 8bc12ab

Please sign in to comment.