From fdad91fd96bc4636bf3a957cdddce18b66473124 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Sat, 13 Nov 2021 21:45:51 +0100 Subject: [PATCH] commands: Make sure pollInterval is always set Fixes #9165 --- commands/hugo.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/commands/hugo.go b/commands/hugo.go index 6be3776b..d442a62b 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 -- 2.30.2