Skip to content
Permalink
Browse files
commands: Avoid too many watch file handles causing the server to fai…
…l to start

Fixes #8904
  • Loading branch information
wzshiming committed Aug 19, 2021
1 parent 24589c0 commit 3f38c785b7208440e2a9dd9a80cb39d4ae23e676
Showing with 6 additions and 1 deletion.
  1. +6 −1 commands/server.go
@@ -261,6 +261,11 @@ 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 {

@@ -283,7 +288,7 @@ func (sc *serverCmd) server(cmd *cobra.Command, args []string) error {

}

return c.serve(sc)
return nil
}

func getRootWatchDirsStr(baseDir string, watchDirs []string) string {

0 comments on commit 3f38c78

Please sign in to comment.