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'))