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 2decde5
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions pymodbus/repl/server/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,14 +198,9 @@ 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_forever()

except CANCELLED_ERROR:
print("Done!!!!!")
loop.run_until_complete(app.run_async(repl))
if repl:
loop.run_until_complete(run_repl(app))


if __name__ == "__main__":
Expand Down

0 comments on commit 2decde5

Please sign in to comment.