diff options
author | Bjørn Erik Pedersen <[email protected]> | 2023-04-13 11:44:22 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2023-04-13 11:44:22 +0200 |
commit | 9906c1ae52e44f2e8ed45873ea36cd83a9e9bcc0 (patch) | |
tree | 2ddf2af8abbd12710c58e16ac6a6066f3b853587 /hugolib | |
parent | 5596dc24a0adc8907f52886a8e035e1bcd66dd8d (diff) | |
download | hugo-9906c1ae52e44f2e8ed45873ea36cd83a9e9bcc0.tar.gz hugo-9906c1ae52e44f2e8ed45873ea36cd83a9e9bcc0.zip |
Prevent the global error collector to panic when sending on closed channel
Diffstat (limited to 'hugolib')
-rw-r--r-- | hugolib/hugo_sites_build.go | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/hugolib/hugo_sites_build.go b/hugolib/hugo_sites_build.go index 66abf4f16..e61dc9876 100644 --- a/hugolib/hugo_sites_build.go +++ b/hugolib/hugo_sites_build.go @@ -163,12 +163,7 @@ func (h *HugoSites) Build(config BuildCfg, events ...fsnotify.Event) error { h.Log.Println(b.String()) } - select { - // Make sure the channel always gets something. - case errCollector <- nil: - default: - } - close(errCollector) + h.StopErrorCollector() err := <-errs if err != nil { |