Skip to content

Commit

Permalink
Don't catch KeyboardInterrupt twice (second attempt)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexrudd2 committed Jun 14, 2023
1 parent 7e73406 commit 0d5747c
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions pymodbus/repl/server/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,15 +198,12 @@ def run(
**web_app_config,
**modbus_config,
)
try:
loop.run_until_complete(app.run_async(repl))
if repl:
loop.run_until_complete(run_repl(app))
loop.run_until_complete(app.run_async(repl))
if repl:
loop.run_until_complete(run_repl(app))
else:
loop.run_forever()

except CANCELLED_ERROR:
print("Done!!!!!")


if __name__ == "__main__":
app()

0 comments on commit 0d5747c

Please sign in to comment.