diff --git a/pymodbus/repl/server/main.py b/pymodbus/repl/server/main.py index d986bee5c..bb01e64d7 100644 --- a/pymodbus/repl/server/main.py +++ b/pymodbus/repl/server/main.py @@ -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()