summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'cmd')
-rw-r--r--cmd/rr/cmd/serve.go13
1 files changed, 5 insertions, 8 deletions
diff --git a/cmd/rr/cmd/serve.go b/cmd/rr/cmd/serve.go
index 664baf15..8028395a 100644
--- a/cmd/rr/cmd/serve.go
+++ b/cmd/rr/cmd/serve.go
@@ -33,20 +33,17 @@ func init() {
CLI.AddCommand(&cobra.Command{
Use: "serve",
Short: "Serve RoadRunner service(s)",
- RunE: serveHandler,
+ Run: serveHandler,
})
signal.Notify(stopSignal, os.Interrupt, os.Kill, syscall.SIGTERM)
}
-func serveHandler(cmd *cobra.Command, args []string) error {
+func serveHandler(cmd *cobra.Command, args []string) {
go func() {
- Container.Serve()
- stopSignal <- nil
+ <-stopSignal
+ Container.Stop()
}()
- <-stopSignal
- Container.Stop()
-
- return nil
+ Container.Serve()
}