From b6a22cd2a7352a80407039b98d4caf06926c975f Mon Sep 17 00:00:00 2001 From: Aaron Heise <5148966+acehoss@users.noreply.github.com> Date: Sat, 25 Feb 2023 05:20:48 -0600 Subject: [PATCH] Fix incorrect callback for loop signals --- rnsh/initiator.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rnsh/initiator.py b/rnsh/initiator.py index 3c30998..62d8477 100644 --- a/rnsh/initiator.py +++ b/rnsh/initiator.py @@ -320,8 +320,8 @@ async def initiate(configdir: str, identitypath: str, verbosity: int, quietness: loop.add_signal_handler(signal.SIGWINCH, sigwinch_handler) _finished = asyncio.Event() - loop.add_signal_handler(signal.SIGINT, _sigint_handler) - loop.add_signal_handler(signal.SIGTERM, _sigint_handler) + loop.add_signal_handler(signal.SIGINT, functools.partial(_sigint_handler, signal.SIGINT, loop)) + loop.add_signal_handler(signal.SIGTERM, functools.partial(_sigint_handler, signal.SIGTERM, loop)) mdu = _link.MDU - 16 sent_eof = False last_winch = time.time()