|
@@ -144,12 +144,10 @@ func call_expand(c pb.EchoClient, message string) {
|
|
|
if err != nil {
|
|
if err != nil {
|
|
|
panic(err)
|
|
panic(err)
|
|
|
}
|
|
}
|
|
|
- waitc := make(chan struct{})
|
|
|
|
|
for {
|
|
for {
|
|
|
in, err := stream.Recv()
|
|
in, err := stream.Recv()
|
|
|
if err == io.EOF {
|
|
if err == io.EOF {
|
|
|
// read done.
|
|
// read done.
|
|
|
- close(waitc)
|
|
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
if err != nil {
|
|
if err != nil {
|
|
@@ -157,5 +155,4 @@ func call_expand(c pb.EchoClient, message string) {
|
|
|
}
|
|
}
|
|
|
log.Printf("Received: %s", in.Text)
|
|
log.Printf("Received: %s", in.Text)
|
|
|
}
|
|
}
|
|
|
- <-waitc
|
|
|
|
|
}
|
|
}
|