diff --git a/cmd/root.go b/cmd/root.go index 6d14c361c987977dfdff81c862eb24052844ab11..35a24ac42149afc3085f0eae0924aa53fcd0ba33 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -13,7 +13,6 @@ import ( "encoding/binary" "encoding/hex" "fmt" - "github.com/pkg/errors" "github.com/spf13/cobra" jww "github.com/spf13/jwalterweatherman" "github.com/spf13/viper" @@ -223,6 +222,7 @@ var rootCmd = &cobra.Command{ // verifies successful message send or retries f := func(allRoundsSucceeded, timedOut bool, rounds map[id.Round]api.RoundResult) { + printRoundResults(allRoundsSucceeded, timedOut, rounds, roundIDs, msg) if !allRoundsSucceeded { retryChan <- struct{}{} } else { @@ -251,22 +251,6 @@ var rootCmd = &cobra.Command{ } - // Construct the callback function which prints out the rounds' results - f := func(allRoundsSucceeded, timedOut bool, - rounds map[id.Round]api.RoundResult) { - printRoundResults(allRoundsSucceeded, timedOut, rounds, roundIDs, msg) - } - - // Have the client report back the round results - err = errors.New("derp") - for j := 0; j < 5 && err != nil; j++ { - err = client.GetRoundResults(roundIDs, roundTimeout, f) - } - - if err != nil { - jww.FATAL.Panicf("Message sending for send %d failed: %+v", i, err) - } - break } }(i)