From ab44e137c3298f107f7db53f6fd377101f21c0df Mon Sep 17 00:00:00 2001 From: Mikhail Paulyshka Date: Wed, 29 Sep 2021 10:21:27 +0300 Subject: [PATCH] Reduce error spam on plugin termination (#188) --- src/galaxy/api/plugin.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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":