hugo

Unnamed repository; edit this file 'description' to name the repository.

git clone git://git.shimmy1996.com/hugo.git
commit ffa2fe61172aa0d892234b23d1497c77a6a7f5c4
parent d966f5d08d7f75f1ae9acd94e292bf61de2adf0d
Author: Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Date:   Sat, 21 Aug 2021 16:32:20 +0200

Revert "commands: Avoid too many watch file handles causing the server to fail to start"

This reverts commit 3f38c785b7208440e2a9dd9a80cb39d4ae23e676.

Diffstat:
Mcommands/server.go | 7+------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/commands/server.go b/commands/server.go
@@ -261,11 +261,6 @@ func (sc *serverCmd) server(cmd *cobra.Command, args []string) error {
 		s.RegisterMediaTypes()
 	}
 
-	err = c.serve(sc)
-	if err != nil {
-		return err
-	}
-
 	// Watch runs its own server as part of the routine
 	if sc.serverWatch {
 
@@ -288,7 +283,7 @@ func (sc *serverCmd) server(cmd *cobra.Command, args []string) error {
 
 	}
 
-	return nil
+	return c.serve(sc)
 }
 
 func getRootWatchDirsStr(baseDir string, watchDirs []string) string {