Skip to content

Commit

Permalink
fix grpc server cannot exit cleanly
Browse files Browse the repository at this point in the history
  • Loading branch information
Bodong-Yang committed Nov 13, 2024
1 parent 9cf935d commit 1233a1c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/otaclient/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,10 @@ async def create_otaclient_grpc_server():
async def launch_otaclient_grpc_server():
server = await create_otaclient_grpc_server()
await server.start()
await server.wait_for_termination()
try:
await server.wait_for_termination()
finally:
await server.stop(1)


def main():
Expand Down

0 comments on commit 1233a1c

Please sign in to comment.