From c54eb2919ab29cbc4f29214c38a65338b295b621 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Mon, 4 May 2026 18:35:57 -0400 Subject: [PATCH] Have nodeconsole cleanly exit --- confluent_client/bin/nodeconsole | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/confluent_client/bin/nodeconsole b/confluent_client/bin/nodeconsole index a3a0bbcf..0794a3cc 100755 --- a/confluent_client/bin/nodeconsole +++ b/confluent_client/bin/nodeconsole @@ -16,7 +16,6 @@ # limitations under the License. -#TODO: clean exit import asyncio import base64 import optparse @@ -280,7 +279,8 @@ class InputHandler: await relay_keypresses(self.buffer[3:], modifiers=[SpecialKeys.ALT, SpecialKeys.SYSRQ]) self.reset_input_context() elif self.buffer == '\x05c.': # Ctrl-E, then . - sys.exit(0) + asyncio.get_running_loop().call_soon(sys.exit, 0) + return elif self.buffer == '\x05cfa': # toggle focus ... toggle_focus_all() elif self.buffer == '\x05c?': # Ctrl-E, then ?