From b1f3ab21151f5d9ad4be611d19c143cebc2afcc2 Mon Sep 17 00:00:00 2001 From: Jeff Li Date: Fri, 4 Aug 2017 21:53:30 +0800 Subject: [PATCH] Resolve the problem --- client.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client.py b/client.py index 66608ef..5f2cbb0 100644 --- a/client.py +++ b/client.py @@ -41,8 +41,8 @@ class RpcClient(object): def __init__(self): - channel = grpc.insecure_channel('localhost:50051') - self.stub = helloworld_pb2_grpc.GreeterStub(channel) + self.channel = grpc.insecure_channel('localhost:50051') + self.stub = helloworld_pb2_grpc.GreeterStub(self.channel) def say_hi(self ): response = self.stub.SayHello(helloworld_pb2.HelloRequest(name='you'))