diff options
author | Valery Piashchynski <[email protected]> | 2020-02-23 16:40:46 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2020-02-23 16:40:46 +0300 |
commit | cd494bf847713a984811c5b5d972c47fc6a58168 (patch) | |
tree | 93e5ac48f549fa7b089059187a8e5d9a76dcee49 | |
parent | 8602c72a17f8ecabef2355d1d24ad569239f7bfa (diff) |
Fix GoExit issue
-rw-r--r-- | service/reload/service.go | 3 | ||||
-rw-r--r-- | service/reload/watcher.go | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/service/reload/service.go b/service/reload/service.go index 7bfb0f28..f267375a 100644 --- a/service/reload/service.go +++ b/service/reload/service.go @@ -6,7 +6,6 @@ import ( "github.com/spiral/roadrunner" "github.com/spiral/roadrunner/service" "os" - "runtime" "strings" "time" ) @@ -146,7 +145,7 @@ func (s *Service) Serve() error { } case <-s.stopc: ticker.Stop() - runtime.Goexit() + return } } }() diff --git a/service/reload/watcher.go b/service/reload/watcher.go index a3b8fe1f..027d2d0d 100644 --- a/service/reload/watcher.go +++ b/service/reload/watcher.go @@ -5,7 +5,6 @@ import ( "io/ioutil" "os" "path/filepath" - "runtime" "sync" "time" ) @@ -228,7 +227,7 @@ func (w *Watcher) waitEvent(d time.Duration) error { ticker.Stop() // just exit // no matter for the pollEvents - runtime.Goexit() + return nil case <-ticker.C: // this is not very effective way // because we have to wait on Lock |