From 27a6fe514690d06c0424e59421dcc02445ad36a7 Mon Sep 17 00:00:00 2001 From: Tibor Vass Date: Thu, 6 Sep 2018 20:18:07 +0000 Subject: [PATCH] pkg/progress: work around closing closed channel panic I could not reproduce the panic in #37735, so here's a bandaid. Signed-off-by: Tibor Vass (cherry picked from commit 7dac70324d0ce6acd23458b0bef06f099837d648) Signed-off-by: Sebastiaan van Stijn Upstream-commit: 2c26eac56628527ed64c79ce9145ed97583cbeca Component: engine --- components/engine/pkg/progress/progress.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/components/engine/pkg/progress/progress.go b/components/engine/pkg/progress/progress.go index 9aea591954..32300914eb 100644 --- a/components/engine/pkg/progress/progress.go +++ b/components/engine/pkg/progress/progress.go @@ -39,6 +39,10 @@ type Output interface { type chanOutput chan<- Progress func (out chanOutput) WriteProgress(p Progress) error { + // FIXME: workaround for panic in #37735 + defer func() { + recover() + }() out <- p return nil }