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.
This commit is contained in:
Tatsushi Demachi 2016-02-20 13:54:35 +09:00
parent 253a618854
commit e9853642e5

View file

@ -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
}