fix rpc client examle (#81)

master
Zhang Hao 4 years ago committed by GitHub
parent 0b1ee79d3a
commit 0f8140031a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -33,8 +33,12 @@ func main() {
log.Fatal(err)
}
done := make(chan struct{})
go func() {
for {
defer func() {
done <- struct{}{}
}()
for i := 0; i < 3; i++ {
resp, err := stm.Recv()
if err != nil {
log.Fatal(err)
@ -52,4 +56,6 @@ func main() {
log.Fatal(err)
}
}
<-done
}

Loading…
Cancel
Save