diff options
author | Anton Titov <[email protected]> | 2019-06-12 23:42:33 +0300 |
---|---|---|
committer | GitHub <[email protected]> | 2019-06-12 23:42:33 +0300 |
commit | 27e8cb3c4086012968b586fcbd5fd40737be2510 (patch) | |
tree | 18c1212bbc00487832633dfcd7a462ff10c5af15 | |
parent | 00abe6b1f26e9def03e7f1ac1b536ec9433370a9 (diff) | |
parent | b85e6bb8b229a730050cd616cacd432dcda9612f (diff) |
Merge pull request #160 from ovr/serve-return-error-from-container
Feature(rr): Serve - dont ignore error from container.Serve
-rw-r--r-- | cmd/rr/cmd/serve.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/cmd/rr/cmd/serve.go b/cmd/rr/cmd/serve.go index 31dd6039..981ad12d 100644 --- a/cmd/rr/cmd/serve.go +++ b/cmd/rr/cmd/serve.go @@ -33,13 +33,13 @@ func init() { CLI.AddCommand(&cobra.Command{ Use: "serve", Short: "Serve RoadRunner service(s)", - Run: serveHandler, + RunE: serveHandler, }) signal.Notify(stopSignal, os.Interrupt, os.Kill, syscall.SIGTERM, syscall.SIGINT) } -func serveHandler(cmd *cobra.Command, args []string) { +func serveHandler(cmd *cobra.Command, args []string) error { stopped := make(chan interface{}) go func() { @@ -49,8 +49,9 @@ func serveHandler(cmd *cobra.Command, args []string) { }() if err := Container.Serve(); err != nil { - return + return err } <-stopped + return nil } |