mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-17 21:01:26 +02:00
Prevent the global error collector to panic when sending on closed channel
This commit is contained in:
@@ -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 {
|
||||
|
Reference in New Issue
Block a user