shithub: hugo

Download patch

ref: e9853642e5214d66357d2622978f0c85019eb24c
parent: 253a618854d353585a0afc6fb18a437916ca1ea6
author: Tatsushi Demachi <[email protected]>
date: Sat Feb 20 08:54:35 EST 2016

Listen channel before sending values to it

The 'results' channel is not listend before sending error values in a
loop checking IsRenderable or not. This fixes it.

--- a/hugolib/site.go
+++ b/hugolib/site.go
@@ -1357,7 +1357,10 @@
 
 	results := make(chan error)
 	pages := make(chan *Page)
+	errs := make(chan error)
 
+	go errorCollator(results, errs)
+
 	procs := getGoMaxProcs()
 
 	// this cannot be fanned out to multiple Go routines
@@ -1386,10 +1389,6 @@
 		wg.Add(1)
 		go pageRenderer(s, pages, results, wg)
 	}
-
-	errs := make(chan error)
-
-	go errorCollator(results, errs)
 
 	for _, page := range s.Pages {
 		pages <- page