hugo

Unnamed repository; edit this file 'description' to name the repository.

git clone git://git.shimmy1996.com/hugo.git
commit e9853642e5214d66357d2622978f0c85019eb24c
parent 253a618854d353585a0afc6fb18a437916ca1ea6
Author: Tatsushi Demachi <tdemachi@gmail.com>
Date:   Sat, 20 Feb 2016 13:54:35 +0900

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.

Diffstat:
Mhugolib/site.go | 7+++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/hugolib/site.go b/hugolib/site.go
@@ -1357,6 +1357,9 @@ func (s *Site) RenderPages() error {
 
 	results := make(chan error)
 	pages := make(chan *Page)
+	errs := make(chan error)
+
+	go errorCollator(results, errs)
 
 	procs := getGoMaxProcs()
 
@@ -1387,10 +1390,6 @@ func (s *Site) RenderPages() error {
 		go pageRenderer(s, pages, results, wg)
 	}
 
-	errs := make(chan error)
-
-	go errorCollator(results, errs)
-
 	for _, page := range s.Pages {
 		pages <- page
 	}