Skip to content
Snippets Groups Projects
Commit 6e3556f1 authored by Josh Brooks's avatar Josh Brooks
Browse files

Small code improvements

parent 4ce8d5a8
Branches
Tags
2 merge requests!117Release,!76Xx 3578/send with verification
...@@ -12,8 +12,8 @@ import ( ...@@ -12,8 +12,8 @@ import (
"encoding/base64" "encoding/base64"
"encoding/binary" "encoding/binary"
"encoding/hex" "encoding/hex"
"errors"
"fmt" "fmt"
"github.com/pkg/errors"
"github.com/spf13/cobra" "github.com/spf13/cobra"
jww "github.com/spf13/jwalterweatherman" jww "github.com/spf13/jwalterweatherman"
"github.com/spf13/viper" "github.com/spf13/viper"
...@@ -244,12 +244,13 @@ var rootCmd = &cobra.Command{ ...@@ -244,12 +244,13 @@ var rootCmd = &cobra.Command{
continue continue
case <-done: case <-done:
// Close channels on verification success // Close channels on verification success
close(retryChan)
close(done) close(done)
close(retryChan)
break break
} }
} else { // Does not verify successful sends }
// Construct the callback function which prints out the rounds' results // Construct the callback function which prints out the rounds' results
f := func(allRoundsSucceeded, timedOut bool, f := func(allRoundsSucceeded, timedOut bool,
rounds map[id.Round]api.RoundResult) { rounds map[id.Round]api.RoundResult) {
...@@ -266,8 +267,6 @@ var rootCmd = &cobra.Command{ ...@@ -266,8 +267,6 @@ var rootCmd = &cobra.Command{
jww.FATAL.Panicf("Message sending for send %d failed: %+v", i, err) jww.FATAL.Panicf("Message sending for send %d failed: %+v", i, err)
} }
}
break break
} }
}(i) }(i)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment