We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 9e39b07 + 248011f commit 4d22181Copy full SHA for 4d22181
cmd/rr/cmd/serve.go
@@ -33,20 +33,17 @@ func init() {
33
CLI.AddCommand(&cobra.Command{
34
Use: "serve",
35
Short: "Serve RoadRunner service(s)",
36
- RunE: serveHandler,
+ Run: serveHandler,
37
})
38
39
signal.Notify(stopSignal, os.Interrupt, os.Kill, syscall.SIGTERM)
40
}
41
42
-func serveHandler(cmd *cobra.Command, args []string) error {
+func serveHandler(cmd *cobra.Command, args []string) {
43
go func() {
44
- Container.Serve()
45
- stopSignal <- nil
+ <-stopSignal
+ Container.Stop()
46
}()
47
48
- <-stopSignal
49
- Container.Stop()
50
-
51
- return nil
+ Container.Serve()
52
0 commit comments