aboutsummaryrefslogtreecommitdiffhomepage
path: root/hugolib
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2023-04-13 11:44:22 +0200
committerBjørn Erik Pedersen <[email protected]>2023-04-13 11:44:22 +0200
commit9906c1ae52e44f2e8ed45873ea36cd83a9e9bcc0 (patch)
tree2ddf2af8abbd12710c58e16ac6a6066f3b853587 /hugolib
parent5596dc24a0adc8907f52886a8e035e1bcd66dd8d (diff)
downloadhugo-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.go7
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 {