Skip to content
Snippets Groups Projects
Commit e50abcc4 authored by Benjamin Wenger's avatar Benjamin Wenger
Browse files

gotta go fast

parent 942d1ca6
Branches
Tags
2 merge requests!53Release,!40Hotfixes
...@@ -12,6 +12,7 @@ import ( ...@@ -12,6 +12,7 @@ import (
"encoding/base64" "encoding/base64"
"encoding/binary" "encoding/binary"
"encoding/hex" "encoding/hex"
"errors"
"fmt" "fmt"
"github.com/spf13/cobra" "github.com/spf13/cobra"
jww "github.com/spf13/jwalterweatherman" jww "github.com/spf13/jwalterweatherman"
...@@ -188,8 +189,9 @@ var rootCmd = &cobra.Command{ ...@@ -188,8 +189,9 @@ var rootCmd = &cobra.Command{
paramsUnsafe := params.GetDefaultUnsafe() paramsUnsafe := params.GetDefaultUnsafe()
sendCnt := int(viper.GetUint("sendCount")) sendCnt := int(viper.GetUint("sendCount"))
sendDelay := time.Duration(viper.GetUint("sendDelay")) //sendDelay := time.Duration(viper.GetUint("sendDelay"))
for i := 0; i < sendCnt; i++ { for i := 0; i < sendCnt; i++ {
go func(){
fmt.Printf("Sending to %s: %s\n", recipientID, msgBody) fmt.Printf("Sending to %s: %s\n", recipientID, msgBody)
var roundIDs []id.Round var roundIDs []id.Round
var roundTimeout time.Duration var roundTimeout time.Duration
...@@ -213,12 +215,15 @@ var rootCmd = &cobra.Command{ ...@@ -213,12 +215,15 @@ var rootCmd = &cobra.Command{
} }
// Have the client report back the round results // 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) err = client.GetRoundResults(roundIDs, roundTimeout, f)
}
if err != nil { if err != nil {
jww.FATAL.Panicf("%+v", err) jww.FATAL.Panicf("%+v", err)
} }
}()
time.Sleep(sendDelay * time.Millisecond)
} }
// Wait until message timeout or we receive enough then exit // Wait until message timeout or we receive enough then exit
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment