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

fixes to CLI

parent 04bcc66b
Branches
Tags
1 merge request!53Release
......@@ -254,10 +254,27 @@ var rootCmd = &cobra.Command{
receiveCnt++
if receiveCnt == expectedCnt {
done = true
break
}
}
}
//wait an extra 5 seconds to make sure no messages were missed
done = false
timer := time.NewTimer(5*time.Second)
for !done {
select {
case <-timer.C:
done = true
break
case m := <-recvCh:
fmt.Printf("Message received: %s\n", string(
m.Payload))
//fmt.Printf("%s", m.Timestamp)
receiveCnt++
}
}
jww.INFO.Printf("Received %d/%d Messages!", receiveCnt, expectedCnt)
fmt.Printf("Received %d\n", receiveCnt)
if roundsNotepad != nil {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment