projects
/
brevno-suite
/
hugo
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
24589c0
)
commands: Avoid too many watch file handles causing the server to fail to start
author
Shiming Zhang
<wzshiming@foxmail.com>
Thu, 19 Aug 2021 09:04:09 +0000
(17:04 +0800)
committer
GitHub
<noreply@github.com>
Thu, 19 Aug 2021 09:04:09 +0000
(11:04 +0200)
Fixes #8904
commands/server.go
patch
|
blob
|
history
diff --git
a/commands/server.go
b/commands/server.go
index 09cf43b249380d7fc63487ada85224e97cbbec8a..48e76da6b8b86b81657a726e482b9b48e8ebd355 100644
(file)
--- a/
commands/server.go
+++ b/
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 {