Skip to content

Commit

Permalink
refactor(http_listener_v2): do not duplicate paths
Browse files Browse the repository at this point in the history
Signed-off-by: Dominik Rosiek <[email protected]>
  • Loading branch information
Dominik Rosiek committed Jul 23, 2021
1 parent 811c703 commit 2a3ef57
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion plugins/inputs/http_listener_v2/http_listener_v2.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,9 @@ func (h *HTTPListenerV2) Start(acc telegraf.Accumulator) error {
}

// Append h.Path to h.Paths
h.Paths = append(h.Paths, h.Path)
if h.Path != "" && !choice.Contains(h.Path, h.Paths) {
h.Paths = append(h.Paths, h.Path)
}

h.acc = acc

Expand Down

0 comments on commit 2a3ef57

Please sign in to comment.