1
0
mirror of https://github.com/beego/bee.git synced 2024-11-22 05:00:54 +00:00

Merge pull request #357 from sergeylanzman/patch-1

Update watch.go
This commit is contained in:
Faissal Elamraoui 2017-02-26 19:12:46 +01:00 committed by GitHub
commit 7bd1e415dd

View File

@ -55,7 +55,7 @@ func NewWatcher(paths []string, files []string, isgenerate bool) {
case e := <-watcher.Events:
isBuild := true
if ifStaticFile(e.Name) || conf.EnableReload {
if ifStaticFile(e.Name) && conf.EnableReload {
sendReload(e.String())
continue
}
@ -82,10 +82,6 @@ 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 conf.EnableReload {
sendReload(e.String())
}
}()
}
case err := <-watcher.Errors: