Browse Source

Merge pull request #55 from thaJeztah/18.09_backport_fix-progress-panic

[18.09] backport pkg/progress: work around closing closed channel panic
Tibor Vass 6 years ago
parent
commit
c24fd7a2c3
1 changed files with 4 additions and 0 deletions
  1. 4 0
      pkg/progress/progress.go

+ 4 - 0
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
 }