From 201321d6652b224c99fe444ffebc68a883354608 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Tue, 14 Oct 2025 14:43:51 +0800 Subject: [PATCH] bugfix --- ahserver/xtermProcessor.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ahserver/xtermProcessor.py b/ahserver/xtermProcessor.py index 5d1e526..c088a02 100644 --- a/ahserver/xtermProcessor.py +++ b/ahserver/xtermProcessor.py @@ -29,7 +29,7 @@ class XtermProcessor(PythonScriptProcessor): debug(f'accept client close request, close the ws') self.running = False return - if data.type == 'input': + if data.type == 'input' and not self.noinput: self.p_obj.stdin.write(data.data) elif data.type == 'heartbeat': await self.ws_send_heartbeat(ws) @@ -64,10 +64,13 @@ class XtermProcessor(PythonScriptProcessor): # it must return a DictObject with sshnode information # parameters: nodeid # + self.noinput = False await self.set_run_env(request, params=params) login_info = await super().path_call(request, params=params) if login_info is None: raise Exception('data error') + if login_info.noinput: + self.noinput = True # debug(f'{login_info=}') ws = web.WebSocketResponse()