mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-23 08:48:32 +02:00
add delay after error while watching change fix
This commit is contained in:
@@ -3,6 +3,7 @@ package main
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"time"
|
||||
|
||||
"github.com/fsnotify/fsnotify"
|
||||
"gopkg.in/yaml.v3"
|
||||
@@ -69,6 +70,7 @@ func (p *Provider) grWatchFileChanges() {
|
||||
p.StopAllRoutes()
|
||||
}
|
||||
case err := <-watcher.Errors:
|
||||
time.Sleep(100 * time.Millisecond)
|
||||
p.Errorf("Watcher", "File watcher error: %s", p.name, err)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user