Add loop to keep server active.
This commit is contained in:
@@ -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
|
||||||
Reference in New Issue
Block a user