Skip to content

Commit

Permalink
fix: stopping of containers
Browse files Browse the repository at this point in the history
  • Loading branch information
shifty11 committed Feb 12, 2024
1 parent 796cac7 commit ad9707f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tools/kysor/cmd/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,19 @@ import (
"context"
"errors"
"fmt"
"github.com/docker/docker/api/types/container"
goTerminal "github.com/leandroveronezi/go-terminal"
"io"
"os"
"os/signal"
"path/filepath"
"runtime"
"strings"
"sync"
"syscall"
"time"

"github.com/docker/docker/api/types/container"
goTerminal "github.com/leandroveronezi/go-terminal"

commoncmd "github.com/KYVENetwork/kyvejs/common/goutils/cmd"

pooltypes "github.com/KYVENetwork/chain/x/pool/types"
Expand Down Expand Up @@ -425,7 +427,6 @@ func printLogs(cli *client.Client, cont *StartResult, color color, errChan chan
fmt.Print(line)
}
endChan <- cont.Name
return
}

func validateVersion(s string) error {
Expand Down Expand Up @@ -681,7 +682,7 @@ func startCmd() *cobra.Command {

errChan := make(chan error) // async error channel
logEndChan := make(chan string) // docker logs ended
exitChan := make(chan interface{}) // program exit's
exitChan := make(chan interface{}, 1) // program exit's
newVersionChan := make(chan interface{}) // new version is available

// Detached -> start containers and forget about them
Expand Down Expand Up @@ -733,7 +734,6 @@ func startCmd() *cobra.Command {
select {
case <-sigc:
// Stop signal received, stop containers
isStopping = true
fmt.Println("\n🛑 Stopping KYSOR...")
return nil
case containerName := <-logEndChan:
Expand Down

0 comments on commit ad9707f

Please sign in to comment.