Skip to content
Snippets Groups Projects
Commit 5c5a5891 authored by Richard T. Carback III's avatar Richard T. Carback III
Browse files

Stop network followers, and don't check for messages when you do not expect any

parent 689a7246
No related branches found
No related tags found
No related merge requests found
...@@ -188,7 +188,7 @@ var rootCmd = &cobra.Command{ ...@@ -188,7 +188,7 @@ var rootCmd = &cobra.Command{
waitTimeout := time.Duration(viper.GetUint("waitTimeout")) waitTimeout := time.Duration(viper.GetUint("waitTimeout"))
timeoutTimer := time.NewTimer(waitTimeout * time.Second) timeoutTimer := time.NewTimer(waitTimeout * time.Second)
done := false done := false
for !done { for !done && expectedCnt != 0 {
select { select {
case <-timeoutTimer.C: case <-timeoutTimer.C:
fmt.Println("Timed out!") fmt.Println("Timed out!")
...@@ -206,6 +206,7 @@ var rootCmd = &cobra.Command{ ...@@ -206,6 +206,7 @@ var rootCmd = &cobra.Command{
} }
} }
fmt.Printf("Received %d\n", receiveCnt) fmt.Printf("Received %d\n", receiveCnt)
client.StopNetworkFollower(1 * time.Second)
}, },
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment