diff options
author | Valery Piashchynski <[email protected]> | 2022-05-21 16:04:41 +0200 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2022-05-21 16:05:28 +0200 |
commit | bc7644da6fe00b52ff3a376174bd8ba2269ff413 (patch) | |
tree | 1a8dbfe7baa9e7857e6346e16fbeb324b1c52a12 /internal | |
parent | 3756e9e2124074fe206456421691018c2353ffb0 (diff) |
fix: don't stop stopped container twice
Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'internal')
-rw-r--r-- | internal/cli/serve/command.go | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/internal/cli/serve/command.go b/internal/cli/serve/command.go index 7f25551b..70b8b995 100644 --- a/internal/cli/serve/command.go +++ b/internal/cli/serve/command.go @@ -19,7 +19,7 @@ const ( ) // NewCommand creates `serve` command. -func NewCommand(override *[]string, cfgFile *string, silent *bool) *cobra.Command { //nolint:funlen,gocognit +func NewCommand(override *[]string, cfgFile *string, silent *bool) *cobra.Command { //nolint:funlen return &cobra.Command{ Use: "serve", Short: "Start RoadRunner server", @@ -96,12 +96,7 @@ func NewCommand(override *[]string, cfgFile *string, silent *bool) *cobra.Comman for { select { case e := <-errCh: - fmt.Printf("error occurred: %v, plugin: %s\n", e.Error, e.VertexID) - - if err = endureContainer.Stop(); err != nil { - fmt.Printf("error occurred during the stopping container: %v\n", err) - } - + fmt.Printf("error occurred: %v, plugin: %s, stopping execution\n", e.Error, e.VertexID) case <-stop: // stop the container after first signal fmt.Printf("stop signal received, grace timeout is: %d seconds\n", uint64(containerCfg.GracePeriod.Seconds())) |