diff --git a/cmd/thanos/receive.go b/cmd/thanos/receive.go index 3a37628ed3c..0c791b2efe7 100644 --- a/cmd/thanos/receive.go +++ b/cmd/thanos/receive.go @@ -263,9 +263,9 @@ func runReceive( cancel() }) } else { - defer close(updates) cancel := make(chan struct{}) g.Add(func() error { + defer close(updates) updates <- receive.SingleNodeHashring(endpoint) <-cancel return nil