Ignore context cancelled error in docker_log (#6221)

This commit is contained in:
Daniel Nelson 2019-08-07 13:50:21 -07:00 committed by GitHub
parent a3a6752f04
commit f88004c62b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -227,7 +227,7 @@ func (d *DockerLogs) Gather(acc telegraf.Accumulator) error {
defer d.removeFromContainerList(container.ID) defer d.removeFromContainerList(container.ID)
err = d.tailContainerLogs(ctx, acc, container, containerName) err = d.tailContainerLogs(ctx, acc, container, containerName)
if err != nil { if err != nil && err != context.Canceled {
acc.AddError(err) acc.AddError(err)
} }
}(container) }(container)