Make sure that HugoSites is always closed when done

Including all the integration tests.
This commit is contained in:
Bjørn Erik Pedersen 2024-10-20 11:25:16 +02:00
parent d37606d2c2
commit 352be5ba87
4 changed files with 32 additions and 4 deletions

View file

@ -1012,10 +1012,6 @@ func (c *serverCommand) serve() error {
c.r.Println("Error:", err)
}
if h := c.hugoTry(); h != nil {
h.Close()
}
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
defer cancel()
wg2, ctx := errgroup.WithContext(ctx)