From df31f04b2689a9d048e948f7c26860ef89fcd771 Mon Sep 17 00:00:00 2001 From: Tavee Khunbida Date: Tue, 8 Jan 2019 22:21:19 +0700 Subject: [PATCH] Fix accidently removed time.Sleep --- cmd/commands/dlv/dlv_amd64.go | 2 +- cmd/commands/run/watch.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/commands/dlv/dlv_amd64.go b/cmd/commands/dlv/dlv_amd64.go index 6ed5901..a61a5fa 100644 --- a/cmd/commands/dlv/dlv_amd64.go +++ b/cmd/commands/dlv/dlv_amd64.go @@ -227,7 +227,7 @@ func startWatcher(paths []string, ch chan int) { // Wait 1s before re-build until there is no file change scheduleTime := time.Now().Add(1 * time.Second) - time.Until(scheduleTime) + time.Sleep(time.Until(scheduleTime)) _, err := buildDebug() if err != nil { utils.Notify("Build Failed: "+err.Error(), "bee") diff --git a/cmd/commands/run/watch.go b/cmd/commands/run/watch.go index 6ad984b..f698f71 100644 --- a/cmd/commands/run/watch.go +++ b/cmd/commands/run/watch.go @@ -85,7 +85,7 @@ func NewWatcher(paths []string, files []string, isgenerate bool) { go func() { // Wait 1s before autobuild until there is no file change. scheduleTime = time.Now().Add(1 * time.Second) - time.Until(scheduleTime) + time.Sleep(time.Until(scheduleTime)) AutoBuild(files, isgenerate) if config.Conf.EnableReload {