server: Fix SIGINT handling after loading bad configuration

Also fix the config error messages.

Fixes #9664
This commit is contained in:
Bjørn Erik Pedersen 2022-05-15 21:01:36 +02:00
parent fc9f315d86
commit 87a22eb6d6
4 changed files with 60 additions and 14 deletions

View file

@ -130,6 +130,15 @@ func (c *commandeerHugoState) hugo() *hugolib.HugoSites {
return c.hugoSites
}
func (c *commandeerHugoState) hugoTry() *hugolib.HugoSites {
select {
case <-c.created:
return c.hugoSites
case <-time.After(time.Millisecond * 100):
return nil
}
}
func (c *commandeer) errCount() int {
return int(c.logger.LogCounters().ErrorCounter.Count())
}