From: Tatsushi Demachi Date: Sat, 20 Feb 2016 04:54:35 +0000 (+0900) Subject: Listen channel before sending values to it X-Git-Tag: v0.16~319 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=e9853642;p=brevno-suite%2Fhugo 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. --- diff --git a/hugolib/site.go b/hugolib/site.go index f8850ed9..0fb2f71f 100644 --- 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 }