Add loop to keep server active.

This commit is contained in:
Piv
2019-09-29 18:59:44 +09:30
parent 78ba890669
commit d91d666aa9

View File

@@ -61,3 +61,9 @@ class MotorServicer(motorService_pb2_grpc.CarControlServicer):
servicer = MotorServicer() servicer = MotorServicer()
servicer.start_server() servicer.start_server()
run = True
while run:
inp = input('Please press q to stop the server')
if inp == 'q' or inp == 'Q':
run = False