From 6bee1b7f317791974ff7f7f1c6ae2d2d95a64015 Mon Sep 17 00:00:00 2001 From: bartfokker Date: Thu, 25 Oct 2018 22:11:17 +0200 Subject: [PATCH] remove unneeded select for simple channel receive --- connector/collector/docker_logs.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/connector/collector/docker_logs.go b/connector/collector/docker_logs.go index 3f1e40f..ae3d4a9 100644 --- a/connector/collector/docker_logs.go +++ b/connector/collector/docker_logs.go @@ -62,10 +62,8 @@ func (l *DockerLogs) Stream() chan models.Log { }() go func() { - select { - case <-l.done: - cancel() - } + <-l.done + cancel() }() log.Infof("log reader started for container: %s", l.id)