mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-27 14:10:31 +03:00
server: Fix SIGINT handling after loading bad configuration
Also fix the config error messages. Fixes #9664
This commit is contained in:
parent
fc9f315d86
commit
87a22eb6d6
4 changed files with 60 additions and 14 deletions
|
@ -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())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue