Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2021-11-13 23:45:51 +0300
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2021-11-13 23:45:51 +0300
commitfdad91fd96bc4636bf3a957cdddce18b66473124 (patch)
treed87310562a6ae01ffbe6978342714339d5d845f6 /commands/hugo.go
parent5f3f60898cfe1c087841ec1fbd5ddc2916d0a2c6 (diff)
commands: Make sure pollInterval is always set
Fixes #9165
Diffstat (limited to 'commands/hugo.go')
-rw-r--r--commands/hugo.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/commands/hugo.go b/commands/hugo.go
index 6be3776bc..d442a62b5 100644
--- a/commands/hugo.go
+++ b/commands/hugo.go
@@ -845,6 +845,10 @@ func (c *commandeer) newWatcher(pollIntervalStr string, dirList ...string) (*wat
c.logger.Printf("Use watcher with poll interval %v", pollInterval)
}
+ if pollInterval == 0 {
+ pollInterval = 500 * time.Millisecond
+ }
+
watcher, err := watcher.New(500*time.Millisecond, pollInterval, poll)
if err != nil {
return nil, err