浏览代码

Remove unnecessary channel from Go expand client.

Tim Burks 9 年之前
父节点
当前提交
03243903e8
共有 1 个文件被更改,包括 0 次插入3 次删除
  1. 0 3
      Examples/Echo/Go/go/src/client/client.go

+ 0 - 3
Examples/Echo/Go/go/src/client/client.go

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