Skip to content

Commit

Permalink
pkg/progress: work around closing closed channel panic
Browse files Browse the repository at this point in the history
I could not reproduce the panic in moby#37735, so here's a bandaid.

Signed-off-by: Tibor Vass <tibor@docker.com>
  • Loading branch information
Tibor Vass committed Sep 6, 2018
1 parent f94eec2 commit 7dac703
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/progress/progress.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 7dac703

Please sign in to comment.