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 <tibor@docker.com>
(cherry picked from commit 7dac70324d)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Tibor Vass 2018-09-06 20:18:07 +00:00 committed by Sebastiaan van Stijn
parent e988001872
commit 2c26eac566
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C

View file

@ -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
}