1
0
mirror of https://github.com/beego/bee.git synced 2024-11-05 06:50:53 +00:00
This commit is contained in:
TankTheFrank 2017-10-19 10:49:40 +00:00 committed by GitHub
commit 575987f137

View File

@ -86,6 +86,12 @@ func NewWatcher(paths []string, files []string, isgenerate bool) {
scheduleTime = time.Now().Add(1 * time.Second)
time.Sleep(scheduleTime.Sub(time.Now()))
AutoBuild(files, isgenerate)
if config.Conf.EnableReload {
// Wait 100ms more before refreshing the browser
time.Sleep(100 * time.Millisecond)
sendReload(e.String())
}
}()
}
case err := <-watcher.Errors: