diff --git a/src/galaxy/api/plugin.py b/src/galaxy/api/plugin.py index ff2e482..9f8cad0 100644 --- a/src/galaxy/api/plugin.py +++ b/src/galaxy/api/plugin.py @@ -1129,8 +1129,11 @@ def create_and_run_plugin(plugin_class, argv): async with plugin_class(reader, writer, token) as plugin: await plugin.run() finally: - writer.close() - await writer.wait_closed() + try: + writer.close() + await writer.wait_closed() + except (ConnectionAbortedError, ConnectionResetError): + pass try: if sys.platform == "win32":