diff options
Diffstat (limited to 'service/reload/watcher.go')
-rw-r--r-- | service/reload/watcher.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/service/reload/watcher.go b/service/reload/watcher.go index d5211d19..a3b8fe1f 100644 --- a/service/reload/watcher.go +++ b/service/reload/watcher.go @@ -5,6 +5,7 @@ import ( "io/ioutil" "os" "path/filepath" + "runtime" "sync" "time" ) @@ -225,7 +226,9 @@ func (w *Watcher) waitEvent(d time.Duration) error { select { case <-w.close: ticker.Stop() - return nil + // just exit + // no matter for the pollEvents + runtime.Goexit() case <-ticker.C: // this is not very effective way // because we have to wait on Lock |