فهرست منبع

Merge pull request #37780 from tiborvass/fix-progress-panic

pkg/progress: work around closing closed channel panic
Tibor Vass 7 سال پیش
والد
کامیت
11841b70d0
1فایلهای تغییر یافته به همراه4 افزوده شده و 0 حذف شده
  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
 }