Sfoglia il codice sorgente

Remove unnecessary channel from Go expand client.

Tim Burks 9 anni fa
parent
commit
03243903e8
1 ha cambiato i file con 0 aggiunte e 3 eliminazioni
  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
 }