diff --git a/cmd/root.go b/cmd/root.go index fb1efae75e8475ef671c9fbddd5b94bba61f0d9f..b025af41c87e773955399a7c69fbfb0d157ea765 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -197,9 +197,9 @@ var rootCmd = &cobra.Command{ receiveCnt := uint(0) waitSecs := viper.GetUint("waitTimeout") waitTimeout := time.Duration(waitSecs) - timeoutTimer := time.NewTimer(waitTimeout * time.Second) done := false for !done && expectedCnt != 0 { + timeoutTimer := time.NewTimer(waitTimeout * time.Second) select { case <-timeoutTimer.C: fmt.Println("Timed out!")